From: Aki Tuomi Date: Mon, 28 Nov 2016 11:32:16 +0000 (+0200) Subject: m4: Detect OpenSSL version 1.0.2 X-Git-Tag: 2.2.27~28 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a71d70b9862a74e097edf91232c5b57e33318dff;p=thirdparty%2Fdovecot%2Fcore.git m4: Detect OpenSSL version 1.0.2 valgrind cannot work in all cases if openssl version is 1.0.2, so we need to know this to selectively disable valgrind. --- diff --git a/configure.ac b/configure.ac index 64e61c454c..9a6f27b3ee 100644 --- a/configure.ac +++ b/configure.ac @@ -1706,6 +1706,17 @@ if test $want_openssl != no && test $have_ssl = no; then have_ssl="yes (OpenSSL)" build_dcrypt_openssl="no" + AC_MSG_CHECKING([if OpenSSL version is 1.0.2 or better]) + + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include + #if OPENSSL_VERSION_NUMBER < 0x10002000L + #error "fail-compile" + #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