]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix #1606 about OpenSSLv1 detection using non-standard location
authorEric Bollengier <eric@eb.homelinux.org>
Wed, 28 Jul 2010 16:17:36 +0000 (18:17 +0200)
committerEric Bollengier <eric@eb.homelinux.org>
Thu, 29 Jul 2010 06:37:35 +0000 (08:37 +0200)
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

index dfceccfb2ce0e94c8f4aa597e2688502e1b562e9..c01c9c9f5e36fa487dcb15b4b260fcabe85cc8fb 100644 (file)
@@ -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])