]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Maintenance: update --with-expat detection (#1726)
authorAmos Jeffries <yadij@users.noreply.github.com>
Wed, 13 Mar 2024 16:26:24 +0000 (16:26 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Fri, 15 Mar 2024 06:01:34 +0000 (06:01 +0000)
configure.ac
test-suite/buildtests/layer-01-minimal.opts

index cc851bd6ce08e14b47b3bb1a5aacd54571b83459..9d046ec98093d44094f2aaa62456bede2558692a 100644 (file)
@@ -832,26 +832,14 @@ AC_ARG_ENABLE(esi,[
 AC_MSG_NOTICE([Enable ESI processor: ${enable_esi:=no (auto)}])
 
 # ESI support libraries: expat
-AH_TEMPLATE(HAVE_LIBEXPAT,[Define to 1 if you have the expat library])
 SQUID_AUTO_LIB(expat,[ESI expat library],[LIBEXPAT])
-AS_IF([test "x$enable_esi" = "xyes" -a "x$with_expat" != "xno"],[
+SQUID_CHECK_LIB_WORKS(expat,[
   SQUID_STATE_SAVE(squid_expat_state)
-  PKG_CHECK_MODULES([LIBEXPAT],[expat],[],[
-    AC_CHECK_LIB([expat],[main],[LIBEXPAT_LIBS="-lexpat"])
-  ])
+  PKG_CHECK_MODULES([LIBEXPAT],[expat],[:],[:])
   CPPFLAGS="$LIBEXPAT_CFLAGS $CPPFLAGS"
   AC_CHECK_HEADERS(expat.h)
   SQUID_STATE_ROLLBACK(squid_expat_state)
-  AS_IF([test "x$LIBEXPAT_LIBS" != "x"],[
-      LIBEXPAT_LIBS="$LIBEXPAT_PATH $LIBEXPAT_LIBS"
-      AC_DEFINE(HAVE_LIBEXPAT,1,[Define to 1 if you have the expat library])
-    ],
-    [test "x$with_expat" = "xyes"],[AC_MSG_ERROR([Required library expat not found.])],
-    [AC_MSG_NOTICE([Library expat not found.])]
-  )
 ])
-AM_CONDITIONAL(ENABLE_LIBEXPAT,[test "x$LIBEXPAT_LIBS" != "x"])
-AC_SUBST(LIBEXPAT_LIBS)
 
 # ESI support libraries: xml2
 AH_TEMPLATE(HAVE_LIBXML2,[Define to 1 if you have the xml2 library])
index 12ced1ea1dc91eee6e574e200bcacd9dccbbfa12..1d5807b4caa97972ba6e1a22776942a81147e38e 100644 (file)
@@ -93,6 +93,7 @@ DISTCHECK_CONFIGURE_FLAGS=" \
        --without-aio \
        --without-cap \
        --without-dl \
+       --without-expat \
        --without-gnugss \
        --without-heimdal-krb5 \
        --without-large-files \