aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.in42
1 files changed, 27 insertions, 15 deletions
diff --git a/configure.in b/configure.in
index 69b4cb714..d7ccbb867 100644
--- a/configure.in
+++ b/configure.in
@@ -540,25 +540,37 @@ then
AC_MSG_WARN(SSL/https support disabled)
else
- dnl Check for & handle argument to --with-ssl.
- AC_MSG_CHECKING(where to look for SSL)
- if test X"$OPT_SSL" = Xoff
- then
- AC_MSG_RESULT([defaults (or given in environment)])
- else
- test X"$OPT_SSL" = Xyes && OPT_SSL=/usr/local/ssl
- dnl LIBS="$LIBS -L$OPT_SSL/lib"
- LDFLAGS="$LDFLAGS -L$OPT_SSL/lib"
- CPPFLAGS="$CPPFLAGS -I$OPT_SSL/include/openssl -I$OPT_SSL/include"
- AC_MSG_RESULT([$OPT_SSL])
- fi
+ dnl Check for and handle argument to --with-ssl.
+ EXTRA_SSL=
+
+ case "$OPT_SSL" in
+ yes)
+ EXTRA_SSL=/usr/local/ssl ;;
+ *)
+ EXTRA_SSL=$OPT_SSL ;;
+ esac
+
+ AC_CHECK_LIB(crypto, CRYPTO_lock,[
+ HAVECRYPTO="yes"
+ ],[
+ OLDLDFLAGS="$LDFLAGS"
+ OLDCPPFLAGS="$CPPFLAGS"
+ LDFLAGS="$LDFLAGS -L$EXTRA_SSL/lib"
+ CPPFLAGS="$CPPFLAGS -I$EXTRA_SSL/include/openssl -I$EXTRA_SSL/include"
+ AC_CHECK_LIB(crypto, CRYPTO_add_lock,[
+ HAVECRYPTO="yes" ], [
+ LDFLAGS="$OLDLDFLAGS"
+ CPPFLAGS="$OLDCPPFLAGS"
+ ])
+ ])
- dnl check for crypto libs (part of SSLeay)
- AC_CHECK_LIB(crypto, CRYPTO_lock)
- if test $ac_cv_lib_crypto_CRYPTO_lock = yes; then
+ if test "$HAVECRYPTO" = "yes"; then
dnl This is only reasonable to do if crypto actually is there: check for
dnl SSL libs NOTE: it is important to do this AFTER the crypto lib
+
+ LIBS="$LIBS -lcrypto"
+
AC_CHECK_LIB(ssl, SSL_connect)
if test "$ac_cv_lib_ssl_SSL_connect" != yes; then