aboutsummaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-05-18 14:42:41 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-05-18 14:42:41 +0000
commit4836154cef881d6ccc7873fd30f10892560bb55e (patch)
tree082421880a711a976cab8a94dbf51019887bc0b0 /configure.in
parent0058e87ed556936857b4df5087505b5ce0035d7e (diff)
this should not set a SSL path to LDFLAGS or CPPFLAGS unless it really needs
to
Diffstat (limited to 'configure.in')
-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