Skip to content

Commit

Permalink
Fix default build with libgnutls but absent GnuTLS headers (#1332)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kinkie authored and yadij committed Apr 28, 2023
1 parent 968c5d9 commit 71d109d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 71d109d

Please sign in to comment.