]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
ESI: Disable by default (#1728)
authorAmos Jeffries <yadij@users.noreply.github.com>
Wed, 13 Mar 2024 08:01:12 +0000 (08:01 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Wed, 13 Mar 2024 10:36:39 +0000 (10:36 +0000)
configure.ac
doc/release-notes/release-7.sgml.in

index 76540e168869b4d112d17a763794ef3a38f053c2..cc851bd6ce08e14b47b3bb1a5aacd54571b83459 100644 (file)
@@ -820,19 +820,21 @@ AC_ARG_ENABLE(delay-pools,
 dnl disable generic/common adaptation support by default
 squid_opt_use_adaptation=no
 
-squid_opt_use_esi=auto
-AH_TEMPLATE([USE_SQUID_ESI],[Define to enable the ESI processor])
-AC_ARG_ENABLE(esi,
-  AS_HELP_STRING([--disable-esi],
-                 [Disable ESI for accelerators. ESI requires expat or xml2 library.
+AH_TEMPLATE([USE_SQUID_ESI],[whether to enable ESI processing])
+AC_ARG_ENABLE(esi,[
+  AS_HELP_STRING([--enable-esi],
+                 [Enable ESI for accelerators. ESI requires expat or xml2 library.
                   Enabling ESI will cause squid reverse proxies to be capable
-                  of the Edge Acceleration Specification (www.esi.org).]),
-                 [squid_opt_use_esi=$enableval],[])
+                  of the Edge Acceleration Specification (www.esi.org).])
+],[
+  SQUID_DEFINE_BOOL(USE_SQUID_ESI,$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$squid_opt_use_esi" != "xno" -a "x$with_expat" != "xno"],[
+AS_IF([test "x$enable_esi" = "xyes" -a "x$with_expat" != "xno"],[
   SQUID_STATE_SAVE(squid_expat_state)
   PKG_CHECK_MODULES([LIBEXPAT],[expat],[],[
     AC_CHECK_LIB([expat],[main],[LIBEXPAT_LIBS="-lexpat"])
@@ -841,7 +843,6 @@ AS_IF([test "x$squid_opt_use_esi" != "xno" -a "x$with_expat" != "xno"],[
   AC_CHECK_HEADERS(expat.h)
   SQUID_STATE_ROLLBACK(squid_expat_state)
   AS_IF([test "x$LIBEXPAT_LIBS" != "x"],[
-      squid_opt_use_esi=yes
       LIBEXPAT_LIBS="$LIBEXPAT_PATH $LIBEXPAT_LIBS"
       AC_DEFINE(HAVE_LIBEXPAT,1,[Define to 1 if you have the expat library])
     ],
@@ -855,7 +856,7 @@ AC_SUBST(LIBEXPAT_LIBS)
 # 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$squid_opt_use_esi" != "xno" -a "x$with_xml2" != "xno"],[
+AS_IF([test "x$enable_esi" = "xyes" -a "x$with_xml2" != "xno"],[
   SQUID_STATE_SAVE([squid_libxml2_save])
   PKG_CHECK_MODULES([LIBXML2],[libxml-2.0],[],[
     AC_CHECK_LIB([xml2],[main],[LIBXML2_LIBS="$LIBXML2_PATH -lxml2"])
@@ -865,7 +866,6 @@ AS_IF([test "x$squid_opt_use_esi" != "xno" -a "x$with_xml2" != "xno"],[
   SQUID_STATE_ROLLBACK([squid_libxml2_save])
 
   AS_IF([test "x$LIBXML2_LIBS" != "x"],[
-    squid_opt_use_esi=yes
     CPPFLAGS="$LIBXML2_CFLAGS $CPPFLAGS"
     LIBXML2_LIBS="$LIBXML2_PATH $LIBXML2_LIBS"
     AC_DEFINE(HAVE_LIBXML2,1,[Define to 1 if you have the xml2 library])
@@ -878,20 +878,10 @@ AS_IF([test "x$squid_opt_use_esi" != "xno" -a "x$with_xml2" != "xno"],[
 AM_CONDITIONAL(ENABLE_LIBXML2,[test "x$LIBXML2_LIBS" != "x"])
 AC_SUBST(LIBXML2_LIBS)
 
-AS_IF([test "x$squid_opt_use_esi" = "xyes"],[
-  AS_IF([test "x$LIBXML2_LIBS" = "x" -a "x$LIBEXPAT_LIBS" = "x"],[
-    AC_MSG_ERROR([ESI processor requires libxml2 or libexpat])
-  ])
-  AC_MSG_NOTICE([Enabling ESI processor: $LIBEXPAT_LIBS $LIBXML2_LIBS])
-  AC_DEFINE(USE_SQUID_ESI,1,[Compile the ESI processor])
-],[
-  AS_IF(test "x$squid_opt_use_esi" = "xno",[
-    AC_MSG_NOTICE([Disabling ESI processor.])
-  ],[
-    AC_MSG_NOTICE([Disabling ESI processor. libxml2 and libexpat not found.])
-  ])
+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])
 ])
-AM_CONDITIONAL(ENABLE_ESI, test "x$squid_opt_use_esi" = "xyes")
+AM_CONDITIONAL(ENABLE_ESI,[test "x$enable_esi" = "xyes"])
 
 AC_ARG_ENABLE(icap-client,
   AS_HELP_STRING([--disable-icap-client],[Disable the ICAP client.]),[
index a839fc679d4e6753ceae0871ab49ab0e38f06544..c08c73e9dea5507d3bd86a6394ff347d3ac38884 100644 (file)
@@ -205,7 +205,9 @@ This section gives an account of those changes in three categories:
 <sect1>Changes to existing options<label id="modifiedoptions">
 <p>
 <descrip>
-       <p>No changed options in this version.
+       <tag>--disable-esi</tag>
+       <p>The ESI feature is now disabled by default.
+          Use <em>--enable-esi</em> if needed.
 
 </descrip>
 </p>