From: Amos Jeffries Date: Fri, 15 Mar 2024 10:21:36 +0000 (+0000) Subject: Maintenance: update --with-xml2 detection (#1727) X-Git-Tag: SQUID_7_0_1~172 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=209bb42516b0b926f0bc308bdf4c7a7e2fa21ec3;p=thirdparty%2Fsquid.git Maintenance: update --with-xml2 detection (#1727) --- diff --git a/configure.ac b/configure.ac index 9d046ec980..9f29dc85c8 100644 --- a/configure.ac +++ b/configure.ac @@ -842,29 +842,14 @@ SQUID_CHECK_LIB_WORKS(expat,[ ]) # ESI support libraries: xml2 -AH_TEMPLATE(HAVE_LIBXML2,[Define to 1 if you have the xml2 library]) SQUID_AUTO_LIB(xml2,[ESI xml2 library],[LIBXML2]) -AS_IF([test "x$enable_esi" = "xyes" -a "x$with_xml2" != "xno"],[ +SQUID_CHECK_LIB_WORKS(xml2,[ SQUID_STATE_SAVE([squid_libxml2_save]) - PKG_CHECK_MODULES([LIBXML2],[libxml-2.0],[],[ - AC_CHECK_LIB([xml2],[main],[LIBXML2_LIBS="$LIBXML2_PATH -lxml2"]) - ]) + PKG_CHECK_MODULES([LIBXML2],[libxml-2.0],[:],[:]) CPPFLAGS="$LIBXML2_CFLAGS $CPPFLAGS" AC_CHECK_HEADERS(libxml/parser.h libxml/HTMLparser.h libxml/HTMLtree.h) SQUID_STATE_ROLLBACK([squid_libxml2_save]) - - AS_IF([test "x$LIBXML2_LIBS" != "x"],[ - CPPFLAGS="$LIBXML2_CFLAGS $CPPFLAGS" - LIBXML2_LIBS="$LIBXML2_PATH $LIBXML2_LIBS" - AC_DEFINE(HAVE_LIBXML2,1,[Define to 1 if you have the xml2 library]) - ],[test "x$with_xml2" = "xyes"],[ - AC_MSG_ERROR([Required library xml2 not found]) - ],[ - AC_MSG_NOTICE([Library xml2 not found.]) - ]) ]) -AM_CONDITIONAL(ENABLE_LIBXML2,[test "x$LIBXML2_LIBS" != "x"]) -AC_SUBST(LIBXML2_LIBS) AS_IF([test "x$enable_esi" = "xyes" -a "x$LIBXML2_LIBS" = "x" -a "x$LIBEXPAT_LIBS" = "x"],[ AC_MSG_ERROR([ESI processor requires libxml2 or libexpat]) diff --git a/test-suite/buildtests/layer-01-minimal.opts b/test-suite/buildtests/layer-01-minimal.opts index 1d5807b4ca..9ca734dc11 100644 --- a/test-suite/buildtests/layer-01-minimal.opts +++ b/test-suite/buildtests/layer-01-minimal.opts @@ -109,6 +109,7 @@ DISTCHECK_CONFIGURE_FLAGS=" \ --without-psapi \ --without-systemd \ --without-tdb \ + --without-xml2 \ " # Fix the distclean testing.