]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Maintenance: update --with-xml2 detection (#1727)
authorAmos Jeffries <yadij@users.noreply.github.com>
Fri, 15 Mar 2024 10:21:36 +0000 (10:21 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Fri, 15 Mar 2024 10:21:40 +0000 (10:21 +0000)
configure.ac
test-suite/buildtests/layer-01-minimal.opts

index 9d046ec98093d44094f2aaa62456bede2558692a..9f29dc85c8cf68b721d2eabad1578b68c4e68b74 100644 (file)
@@ -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])
index 1d5807b4caa97972ba6e1a22776942a81147e38e..9ca734dc1171169f2fda87f30c19ebfda0aa1444 100644 (file)
@@ -109,6 +109,7 @@ DISTCHECK_CONFIGURE_FLAGS=" \
        --without-psapi \
        --without-systemd \
        --without-tdb \
+       --without-xml2 \
        "
 
 # Fix the distclean testing.