From: Francesco Chemolli <5175948+kinkie@users.noreply.github.com> Date: Thu, 27 Apr 2023 16:42:02 +0000 (+0000) Subject: Fix default build with libgnutls but absent GnuTLS headers (#1332) X-Git-Tag: SQUID_7_0_1~447 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=580160fb19d3e4ea2dfb1cb6c1e11a335828829d;p=thirdparty%2Fsquid.git Fix default build with libgnutls but absent GnuTLS headers (#1332) Ensure that when libgnutls is found but any of the required GnuTLS headers cannot be used, GnuTLS support is not enabled by default and an explicit request for GnuTLS support is fatally rejected during ./configure. Otherwise, the build fails later anyway, during "make". The problem was exposed by a mingw-cross build. --- diff --git a/configure.ac b/configure.ac index 6bb72f0eed..a7429a86eb 100644 --- a/configure.ac +++ b/configure.ac @@ -1093,7 +1093,8 @@ AS_IF([test "x$with_gnutls" != "xno"],[ ## by testing for a 3.4.0+ function which we use AC_CHECK_LIB(gnutls,gnutls_pcert_export_x509,[LIBGNUTLS_LIBS="-lgnutls"]) ]) - AC_CHECK_HEADERS(gnutls/gnutls.h gnutls/x509.h gnutls/abstract.h) + # if any of the required headers is not found, signal we can't support gnutls + AC_CHECK_HEADERS([gnutls/gnutls.h gnutls/x509.h gnutls/abstract.h], [], [LIBGNUTLS_LIBS=""]) SQUID_STATE_ROLLBACK(squid_gnutls_state) #de-pollute LIBS