diff configure.ac @ 21240:005884a0d3f7

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.
author Aki Tuomi <aki.tuomi@dovecot.fi>
date Mon, 28 Nov 2016 13:32:16 +0200
parents fa9a9c236232
children 08bd444ec0c8
line wrap: on
line diff
--- a/configure.ac	Mon Nov 28 14:12:23 2016 +0200
+++ b/configure.ac	Mon Nov 28 13:32:16 2016 +0200
@@ -1706,6 +1706,17 @@
     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 <openssl/opensslv.h>
+      #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