From: Paul Howarth Date: Fri, 28 Oct 2016 14:10:16 +0000 (+0300) Subject: configure: Improve check for OpenSSL without EC support X-Git-Tag: 2.2.26.0~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9e110864e579deeda3c6885b37cc62d7f5b3e94f;p=thirdparty%2Fdovecot%2Fcore.git configure: Improve check for OpenSSL without EC support The original test was for EC_KEY_new but some systems had that and not EVP_PKEY_CTX_new_id, so the test was switched to that function. However, Fedora releases 12 through 17 have EVP_PKEY_CTX_new_id but not EC_KEY_new. So we need to test for both functions before enabling the dcrypt build. --- diff --git a/configure.ac b/configure.ac index 1629ddd295..f6c4fca3ba 100644 --- a/configure.ac +++ b/configure.ac @@ -1716,10 +1716,13 @@ if test $want_openssl != no && test $have_ssl = no; then AC_CHECK_LIB(ssl, SSL_COMP_free_compression_methods, [ AC_DEFINE(HAVE_SSL_COMP_FREE_COMPRESSION_METHODS,, [Build with SSL_COMP_free_compression_methods() support]) ],, $SSL_LIBS) - AC_CHECK_LIB(ssl, [EVP_PKEY_CTX_new_id], - [build_dcrypt_openssl="yes"], - AC_MSG_WARN([No ECC support in OpenSSL - not enabling dcrypt]), - $SSL_LIBS) + AC_CHECK_LIB(ssl, [EVP_PKEY_CTX_new_id], [have_evp_pkey_ctx_new_id="yes"],, $SSL_LIBS) + AC_CHECK_LIB(ssl, [EC_KEY_new], [have_ec_key_new="yes"],, $SSL_LIBS) + if test "$have_evp_pkey_ctx_new_id" = "yes" && test "$have_ec_key_new" = "yes"; then + build_dcrypt_openssl="yes" + else + AC_MSG_WARN([No ECC support in OpenSSL - not enabling dcrypt]) + fi fi fi