summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorBrendan Cully <brendan@kublai.com>2007-09-04 17:22:59 -0700
committerBrendan Cully <brendan@kublai.com>2007-09-04 17:22:59 -0700
commit3abd291f6078c12d1a12ee7ba010de5a8e9349ad (patch)
tree7961fc0696218a1742e487bbf41a350d18a27bb5 /configure.ac
parent6568514765b200b45eb8e746fcb1c3de7b249234 (diff)
Add libz to crypto libs if available (closes #2303).
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 9 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index f973af84..34d11e28 100644
--- a/configure.ac
+++ b/configure.ac
@@ -647,15 +647,20 @@ AC_ARG_WITH(ssl, AC_HELP_STRING([--with-ssl[=PFX]], [Compile in SSL support for
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)
-
+ crypto_libs=""
+ AC_CHECK_LIB(z, deflate, [crypto_libs=-lz])
+ AC_CHECK_LIB(crypto, X509_new,
+ [crypto_libs="-lcrypto $crypto_libs"],, [$crypto_libs])
+ AC_CHECK_LIB(ssl, SSL_new,,
+ AC_MSG_ERROR([Unable to find SSL library]), [$crypto_libs])
+
+ LIBS="$LIBS $crypto_libs"
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 $crypto_libs"
MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_ssl.o"
need_ssl=yes
fi