From 9cb86afebee7e09c5f6a1a4cdecde6b227e98f0a 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 0c3facb486..4c743751c8 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -1173,9 +1173,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]) @@ -1189,6 +1186,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" @@ -1204,8 +1208,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_SUBST(OPENSSL_LIBS) -- 2.39.2