From: Ondřej Surý Date: Thu, 2 Sep 2021 11:24:46 +0000 (+0200) Subject: Remove AX_CHECK_OPENSSL macro X-Git-Tag: alessio/regression/a26055f03e~6^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d77eafd13f27d0c4711cc70eb0245d0c3268f9d;p=thirdparty%2Fbind9.git Remove AX_CHECK_OPENSSL macro OpenSSL supports pkg-config method since the 0.9.8 version and we already require pkg-config for other mandatory libraries. Also the way the AX_CHECK_OPENSSL macro was integrated into the configure script was confusing - the macro would be used only if the libcrypto.pc and libssl.pc file are not usable, so calling ./configure --with-openssl=/usr/local would have no effect when PKG_CHECK_MODULES would be successful. --- diff --git a/configure.ac b/configure.ac index a7fa50ef78f..f764eb15490 100644 --- a/configure.ac +++ b/configure.ac @@ -653,25 +653,14 @@ CRYPTO=OpenSSL # # OpenSSL/LibreSSL is mandatory # -PKG_CHECK_MODULES([OPENSSL], [libssl >= 1.1.1 libcrypto >= 1.1.1], [PKG_CHECK_VERSION([OPENSSL_VERSION], [openssl])], - [AX_CHECK_OPENSSL([:], [AC_MSG_FAILURE([OpenSSL/LibreSSL not found])])]) +PKG_CHECK_MODULES([OPENSSL], [libssl >= 1.1.1 libcrypto >= 1.1.1]) +PKG_CHECK_VERSION([OPENSSL_VERSION], [openssl]) AX_SAVE_FLAGS([openssl]) CFLAGS="$OPENSSL_CFLAGS $CFLAGS" LIBS="$OPENSSL_LIBS $LIBS" -AC_MSG_CHECKING([for OpenSSL >= 1.1.1 or LibreSSL >= 2.7.0]) -AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[#include ]], - [[#if (!defined(LIBRESSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER < 0x01010100fL)) || \\ - (defined(LIBRESSL_VERSION_NUMBER) && (LIBRESSL_VERSION_NUMBER < 0x02070000fL)) - #error OpenSSL >= 1.1.1 or LibreSSL >= 2.7.0 required - #endif - ]])], - [AC_MSG_RESULT([yes])], - [AC_MSG_FAILURE([not found])]) - # # Check for functions added in OpenSSL or LibreSSL #