aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-04-26 22:13:36 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-04-26 22:13:36 +0000
commit6bd02a3ab5d951e5fa99495ebe3a1aca7cbaaede (patch)
tree7a8a920fbb091e4a1a4b1889d82f9a0395d99927
parent372e7a6cd411f9350c67abee7066ee38c7d3ecf6 (diff)
We now make sure to only scan for SSL options with pkg-config if we haven't
disabled SSL with --without-ssl. This previously made the Makefiles use the SSL libs even though told not to.
-rw-r--r--configure.ac65
1 files changed, 31 insertions, 34 deletions
diff --git a/configure.ac b/configure.ac
index bc65cf5c7..bb35e3bf6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -672,33 +672,6 @@ else
AC_MSG_RESULT(no)
fi
-
-dnl Detect the pkg-config tool, as it may have extra info about the
-dnl openssl installation we can use. I *believe* this is what we are
-dnl expected to do on really recent Redhat Linux hosts.
-AC_PATH_PROG( PKGCONFIG, pkg-config, no, $PATH:/usr/bin:/usr/local/bin)
-if test "$PKGCONFIG" != "no" ; then
- AC_MSG_CHECKING([for OpenSSL options using pkg-config])
-
- $PKGCONFIG --exists openssl
- SSL_EXISTS=$?
-
- if test "$SSL_EXISTS" -eq "0"; then
- SSL_LIBS=`$PKGCONFIG --libs-only-l openssl 2>/dev/null`
- SSL_LDFLAGS=`$PKGCONFIG --libs-only-L openssl 2>/dev/null`
- SSL_CPPFLAGS=`$PKGCONFIG --cflags-only-I openssl 2>/dev/null`
-
- LIBS="$LIBS $SSL_LIBS"
- CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS"
- LDFLAGS="$LDFLAGS $SSL_LDFLAGS"
-
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- fi
-
-fi
-
dnl **********************************************************************
dnl Check for the presence of SSL libraries and headers
dnl **********************************************************************
@@ -717,11 +690,36 @@ then
AC_MSG_WARN([SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more])
else
- dnl Check for and handle argument to --with-ssl.
-
- dnl save the pre-ssl check flags for a while
+ dnl backup the pre-ssl variables
CLEANLDFLAGS="$LDFLAGS"
CLEANCPPFLAGS="$CPPFLAGS"
+ CLEANLIBS="$LIBS"
+
+ dnl Detect the pkg-config tool, as it may have extra info about the openssl
+ dnl installation we can use. I *believe* this is what we are expected to do
+ dnl on really recent Redhat Linux hosts.
+
+ AC_PATH_PROG( PKGCONFIG, pkg-config, no, $PATH:/usr/bin:/usr/local/bin)
+ if test "$PKGCONFIG" != "no" ; then
+ AC_MSG_CHECKING([OpenSSL options with pkg-config])
+
+ $PKGCONFIG --exists openssl
+ SSL_EXISTS=$?
+
+ if test "$SSL_EXISTS" -eq "0"; then
+ SSL_LIBS=`$PKGCONFIG --libs-only-l openssl 2>/dev/null`
+ SSL_LDFLAGS=`$PKGCONFIG --libs-only-L openssl 2>/dev/null`
+ SSL_CPPFLAGS=`$PKGCONFIG --cflags-only-I openssl 2>/dev/null`
+
+ dnl use the values pkg-config reported
+ LIBS="$LIBS $SSL_LIBS"
+ CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS"
+ LDFLAGS="$LDFLAGS $SSL_LDFLAGS"
+ AC_MSG_RESULT([found])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ fi
case "$OPT_SSL" in
yes)
@@ -739,14 +737,13 @@ else
AC_CHECK_LIB(crypto, CRYPTO_lock,[
HAVECRYPTO="yes"
],[
- OLDLDFLAGS="$LDFLAGS"
- OLDCPPFLAGS="$CPPFLAGS"
LDFLAGS="$CLEANLDFLAGS -L$EXTRA_SSL/lib$libsuff"
CPPFLAGS="$CLEANCPPFLAGS -I$EXTRA_SSL/include/openssl -I$EXTRA_SSL/include"
AC_CHECK_LIB(crypto, CRYPTO_add_lock,[
HAVECRYPTO="yes" ], [
- LDFLAGS="$OLDLDFLAGS"
- CPPFLAGS="$OLDCPPFLAGS"
+ LDFLAGS="$CLEANLDFLAGS"
+ CPPFLAGS="$CLEANCPPFLAGS"
+ LIBS="$CLEANLIBS"
])
])