mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
this should not set a SSL path to LDFLAGS or CPPFLAGS unless it really needs
to
This commit is contained in:
parent
0058e87ed5
commit
4836154cef
42
configure.in
42
configure.in
@ -540,25 +540,37 @@ then
|
|||||||
AC_MSG_WARN(SSL/https support disabled)
|
AC_MSG_WARN(SSL/https support disabled)
|
||||||
else
|
else
|
||||||
|
|
||||||
dnl Check for & handle argument to --with-ssl.
|
dnl Check for and handle argument to --with-ssl.
|
||||||
AC_MSG_CHECKING(where to look for SSL)
|
EXTRA_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 crypto libs (part of SSLeay)
|
case "$OPT_SSL" in
|
||||||
AC_CHECK_LIB(crypto, CRYPTO_lock)
|
yes)
|
||||||
|
EXTRA_SSL=/usr/local/ssl ;;
|
||||||
|
*)
|
||||||
|
EXTRA_SSL=$OPT_SSL ;;
|
||||||
|
esac
|
||||||
|
|
||||||
if test $ac_cv_lib_crypto_CRYPTO_lock = yes; then
|
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"
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
if test "$HAVECRYPTO" = "yes"; then
|
||||||
dnl This is only reasonable to do if crypto actually is there: check for
|
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
|
dnl SSL libs NOTE: it is important to do this AFTER the crypto lib
|
||||||
|
|
||||||
|
LIBS="$LIBS -lcrypto"
|
||||||
|
|
||||||
AC_CHECK_LIB(ssl, SSL_connect)
|
AC_CHECK_LIB(ssl, SSL_connect)
|
||||||
|
|
||||||
if test "$ac_cv_lib_ssl_SSL_connect" != yes; then
|
if test "$ac_cv_lib_ssl_SSL_connect" != yes; then
|
||||||
|
Loading…
Reference in New Issue
Block a user