diff options
-rwxr-xr-x | configure | 48 | ||||
-rw-r--r-- | configure.ac | 10 |
2 files changed, 56 insertions, 2 deletions
@@ -12751,6 +12751,51 @@ $as_echo "$as_me: disabling https support" >&6;} $as_echo "#define HTS_USEOPENSSL 0" >>confdefs.h else +SAVE_LIBS=$LIBS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_get_digestbyname in -lcrypto" >&5 +$as_echo_n "checking for EVP_get_digestbyname in -lcrypto... " >&6; } +if ${ac_cv_lib_crypto_EVP_get_digestbyname+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char EVP_get_digestbyname (); +int +main () +{ +return EVP_get_digestbyname (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_crypto_EVP_get_digestbyname=yes +else + ac_cv_lib_crypto_EVP_get_digestbyname=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_get_digestbyname" >&5 +$as_echo "$ac_cv_lib_crypto_EVP_get_digestbyname" >&6; } +if test "x$ac_cv_lib_crypto_EVP_get_digestbyname" = xyes; then : + + OPENSSL_LIBS="-lcrypto" + + +fi + +LIBS="$LIBS $OPENSSL_LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5 $as_echo_n "checking for SSL_library_init in -lssl... " >&6; } if ${ac_cv_lib_ssl_SSL_library_init+:} false; then : @@ -12789,7 +12834,7 @@ fi $as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; } if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then : - OPENSSL_LIBS="-lcrypto -lssl" + OPENSSL_LIBS="$OPENSSL_LIBS -lssl" $as_echo "#define HTS_USEOPENSSL 1" >>confdefs.h @@ -12806,6 +12851,7 @@ $as_echo "not available" >&6; } fi +LIBS=$SAVE_LIBS fi diff --git a/configure.ac b/configure.ac index 7774601..0827cb0 100644 --- a/configure.ac +++ b/configure.ac @@ -149,9 +149,16 @@ if test x"$https_support" = x"no"; then AC_MSG_NOTICE([disabling https support]) AC_DEFINE(HTS_USEOPENSSL, 0) else +SAVE_LIBS=$LIBS +AC_CHECK_LIB(crypto, EVP_get_digestbyname, + [ + OPENSSL_LIBS="-lcrypto" + ] + ) +LIBS="$LIBS $OPENSSL_LIBS" AC_CHECK_LIB(ssl, SSL_library_init, [ - OPENSSL_LIBS="-lcrypto -lssl" + OPENSSL_LIBS="$OPENSSL_LIBS -lssl" AC_DEFINE(HTS_USEOPENSSL, 1, [Check for OpenSSL]) ], [ @@ -162,6 +169,7 @@ AC_CHECK_LIB(ssl, SSL_library_init, fi ] ) +LIBS=$SAVE_LIBS AC_SUBST(OPENSSL_LIBS) fi |