From 8de4d80e35d800bfcb3a6d5ef15e1573ccb06bf1 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Wed, 28 Jul 2010 18:17:36 +0200 Subject: [PATCH] Fix #1606 about OpenSSLv1 detection using non-standard location The AC_CHECK_LIB was trying to detect the EVP_PKEY_encrypt_old just after that LIBS and CFLAGS were cleared. --- bacula/autoconf/configure.in | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index dfceccfb2c..c01c9c9f5e 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -1171,9 +1171,6 @@ if test "x$with_openssl_directory" != "xno"; then ] ) - LIBS="${saved_LIBS}" - CFLAGS="${saved_CFLAGS}" - if test "$support_tls" = "yes"; then AC_DEFINE(HAVE_OPENSSL, 1, [Define if OpenSSL library is available]) AC_DEFINE(HAVE_TLS, 1, [Define if TLS support should be enabled]) @@ -1187,6 +1184,13 @@ if test "x$with_openssl_directory" != "xno"; then if test "$ac_cv_openssl_export" = "yes"; then AC_DEFINE(HAVE_OPENSSL_EXPORT_LIBRARY, 1, [Define if the OpenSSL library is export-contrained to 128bit ciphers]) fi + + if test "$support_crypto" = "yes"; then + AC_CHECK_LIB(ssl, EVP_PKEY_encrypt_old, AC_DEFINE(HAVE_OPENSSLv1, 1, [Set if have OpenSSL version 1.x])) + fi + + LIBS="${saved_LIBS}" + CFLAGS="${saved_CFLAGS}" else support_tls="no" support_crypto="no" @@ -1201,8 +1205,6 @@ fi if test "$support_crypto" = "no"; then OPENSSL_LIBS="" OPENSSL_INC="" -else - AC_CHECK_LIB(ssl, EVP_PKEY_encrypt_old, AC_DEFINE(HAVE_OPENSSLv1, 1, [Set if have OpenSSL version 1.x])) fi AC_MSG_RESULT([$support_tls]) -- 2.39.5