Re: mutt/2303: problem with "ac_cv_lib_ssl_SSL_new" test
The following reply was made to PR mutt/2303; it has been noted by GNATS.
From: Ralf Wildenhues <wildenhues@xxxxxxxxxxxxxxx>
To: bug-any@xxxxxxxxxxxxx
Cc:
Subject: Re: mutt/2303: problem with "ac_cv_lib_ssl_SSL_new" test
Date: Mon, 25 Sep 2006 11:42:09 +0200
* leavemealone stopuce wrote on Mon, Sep 25, 2006 at 10:15:03AM CEST:
>
> I thought this was solved and closed. Very sorry for the misunderstanding.
Oh, no, I think it's me to apologize. You sent me a message privately
(due to some mailing issue), I forgot about it. Sorry about that.
> It was some problem of libz not getting put into $LIBS when building
> with SSL support. Thus the test "ac_cv_lib_ssl_SSL_new" needs to
> include libz or test whether or not SSL was built with libz support.
> It only becomes a problem when building a statically linked Mutt.
>
> Easiest fix is to export LIBS="-lz" before running configure.
A patch to fix this would be this one, I guess.
Note I do not know whether libcrypto may also be built without needing
libz (in which case the patch is too strict).
Cheers,
Ralf
* configure.in: libcrypto depends on libz, so search that, too.
Fixes #2303.
Index: configure.in
===================================================================
RCS file: /home/roessler/cvs/mutt/configure.in,v
retrieving revision 3.56
diff -u -r3.56 configure.in
--- configure.in 1 Sep 2006 19:26:39 -0000 3.56
+++ configure.in 25 Sep 2006 08:25:03 -0000
@@ -641,15 +642,16 @@
fi
saved_LIBS="$LIBS"
- AC_CHECK_LIB(crypto, X509_new,, AC_MSG_ERROR([Unable to find SSL
library]))
- AC_CHECK_LIB(ssl, SSL_new,, AC_MSG_ERROR([Unable to find SSL
library]), -lcrypto)
+ AC_CHECK_LIB(z, deflate, , [AC_MSG_ERROR([Unable to find libz])])
+ AC_CHECK_LIB(crypto, X509_new,, [AC_MSG_ERROR([Unable to find SSL
library])], -lz)
+ AC_CHECK_LIB(ssl, SSL_new,, [AC_MSG_ERROR([Unable to find SSL
library])], -lcrypto -lz)
AC_CHECK_FUNCS(RAND_status RAND_egd)
AC_DEFINE(USE_SSL,1,[ Define if you want support for SSL. ])
AC_DEFINE(USE_SSL_OPENSSL,1,[ Define if you want support for SSL
via OpenSSL. ])
LIBS="$saved_LIBS"
- MUTTLIBS="$MUTTLIBS -lssl -lcrypto"
+ MUTTLIBS="$MUTTLIBS -lssl -lcrypto -lz"
MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_ssl.o"
need_ssl=yes