------------------------------------------------------------ revno: 13971 revision-id: squid3@treenet.co.nz-20160105054139-jzcz2y1hhwwhqy3c parent: squid3@treenet.co.nz-20160105053622-9wrbj3r4iu3vqgeb author: Francesco Chemolli committer: Amos Jeffries branch nick: 3.5 timestamp: Tue 2016-01-05 18:41:39 +1300 message: Fix GnuTLS detection via pkg-config ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20160105054139-jzcz2y1hhwwhqy3c # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.5 # testament_sha1: 0bc5371da00f390d24b879d8a08a786e931fd056 # timestamp: 2016-01-05 05:45:00 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.5 # base_revision_id: squid3@treenet.co.nz-20160105053622-\ # 9wrbj3r4iu3vqgeb # # Begin patch === modified file 'acinclude/squid-util.m4' --- acinclude/squid-util.m4 2016-01-01 00:14:27 +0000 +++ acinclude/squid-util.m4 2016-01-05 05:41:39 +0000 @@ -19,6 +19,7 @@ $1_LIBS="${LIBS}" $1_CC="${CC}" $1_CXX="${CXX}" +$1_CPPFLAGS="${CPPFLAGS}" $1_squid_saved_vars="$2" for squid_util_var_tosave in $$1_squid_saved_vars do @@ -38,6 +39,7 @@ unset $1_LIBS unset $1_CC unset $1_CXX +unset $1_CPPFLAGS for squid_util_var_tosave in $$1_squid_saved_vars do unset ${squid_util_var_tosave} @@ -56,6 +58,7 @@ LIBS="${$1_LIBS}" CC="${$1_CC}" CXX="${$1_CXX}" +CPPFLAGS="${$1_CPPFLAGS}" for squid_util_var_tosave in $$1_squid_saved_vars do squid_util_var_tosave2="\$$1_${squid_util_var_tosave}" === modified file 'configure.ac' --- configure.ac 2016-01-01 00:14:27 +0000 +++ configure.ac 2016-01-05 05:41:39 +0000 @@ -1259,19 +1259,21 @@ ]) AH_TEMPLATE(USE_GNUTLS,[GnuTLS support is available]) if test "x$with_gnutls" != "xno"; then - AC_CHECK_HEADERS(gnutls/gnutls.h gnutls/x509.h) + SQUID_STATE_SAVE(squid_gnutls_state) # User may have provided a custom location for GnuTLS. Otherwise... - SQUID_STATE_SAVE(squid_gnutls_state) LIBS="$LIBS $LIBGNUTLS_PATH" # auto-detect using pkg-config - PKG_CHECK_MODULES([LIBGNUTLS],[gnutls >= 3.1.5],,[ + PKG_CHECK_MODULES([LIBGNUTLS],[gnutls >= 3.1.5],[ + CPPFLAGS="$CPPFLAGS $LIBGNUTLS_CFLAGS" + ],[ ## find the package without pkg-config ## check that the library is actually new enough. ## by testing for a 3.1.5+ function which we use AC_CHECK_LIB(gnutls,gnutls_certificate_verify_peers3,[LIBGNUTLS_LIBS="-lgnutls"]) ]) + AC_CHECK_HEADERS(gnutls/gnutls.h gnutls/x509.h) SQUID_STATE_ROLLBACK(squid_gnutls_state) #de-pollute LIBS