]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
configure: Fix building without OpenSSL
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Sun, 4 Dec 2016 01:45:54 +0000 (03:45 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Sun, 4 Dec 2016 01:45:54 +0000 (03:45 +0200)
AM_CONDITIONAL() needs to be part of the code path that is always run,
or it fails with:

configure: error: conditional "SSL_VERSION_GE_102" was never defined.

m4/ssl.m4

index a7321e391e1925e4160a37a1023a06baf167f23d..cdddda0def2a8c1429de80d6abe3fbe5e68978df 100644 (file)
--- a/m4/ssl.m4
+++ b/m4/ssl.m4
@@ -38,8 +38,6 @@ AC_DEFUN([DOVECOT_SSL], [
        #endif]], [[ return 0; ]])], [ssl_version_ge_102=true], [ssl_version_ge_102=false])
       AC_MSG_RESULT([$ssl_version_ge_102])
 
-      AM_CONDITIONAL([SSL_VERSION_GE_102], [test x$ssl_version_ge_102 = xtrue])
-
       # SSL_clear_options introduced in openssl 0.9.8m but may be backported to
       # older versions in "enterprise" OS releases; originally implemented as a
       # macro but as a function in more recent openssl versions
@@ -82,6 +80,7 @@ AC_DEFUN([DOVECOT_SSL], [
   fi
   AM_CONDITIONAL(BUILD_OPENSSL, test "$have_openssl" = "yes")
   AM_CONDITIONAL(BUILD_DCRYPT_OPENSSL, test "$build_dcrypt_openssl" = "yes")
+  AM_CONDITIONAL([SSL_VERSION_GE_102], [test x$ssl_version_ge_102 = xtrue])
 
   if test $want_gnutls != no && test $have_ssl = no; then
     AC_CHECK_LIB(gnutls, gnutls_global_init, [