From: Willem Toorop Date: Mon, 8 Nov 2021 12:52:22 +0000 (+0100) Subject: Specify OPENSSL_API_COMPAT 10100 when OpenSSL >= 3.0.0 X-Git-Tag: 1.8.0-rc.1~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a4050fa1eb7140763c7fd3ff7473be65f2ee6e0;p=thirdparty%2Fldns.git Specify OPENSSL_API_COMPAT 10100 when OpenSSL >= 3.0.0 To supress deprecation warnings when our API is still supported --- diff --git a/configure.ac b/configure.ac index 202c0983..49e6e22e 100644 --- a/configure.ac +++ b/configure.ac @@ -359,6 +359,22 @@ else fi AC_CHECK_HEADERS([openssl/ssl.h openssl/evp.h openssl/engine.h openssl/conf.h]) AC_CHECK_FUNCS([EVP_sha256 EVP_sha384 EVP_sha512 EVP_PKEY_keygen ECDSA_SIG_get0 EVP_MD_CTX_new EVP_PKEY_base_id DSA_SIG_set0 DSA_SIG_get0 EVP_dss1 DSA_get0_pqg DSA_get0_key EVP_cleanup ENGINE_cleanup ENGINE_free CRYPTO_cleanup_all_ex_data ERR_free_strings CONF_modules_unload OPENSSL_init_ssl OPENSSL_init_crypto ERR_load_crypto_strings CRYPTO_memcmp EVP_PKEY_get_base_id]) +AC_MSG_CHECKING([Checking for OpenSSL >= 3.0.0]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ +#include +#if OPENSSL_VERSION_MAJOR >= 3 +#define SOMETHING +#else +This fails compiling. +So either no OpenSSL at all (the include already failed), or the version < 3.0.0 +#endif +], [ +])], [ + AC_MSG_RESULT(yes) + CFLAGS="-DOPENSSL_API_COMPAT=10100 $CFLAGS" +], [ AC_MSG_RESULT(no) +]) + # for macosx, see if glibtool exists and use that # BSD's need to know the version...