@@ -820,19 +820,21 @@ AC_ARG_ENABLE(delay-pools,
820820dnl disable generic/common adaptation support by default
821821squid_opt_use_adaptation=no
822822
823- squid_opt_use_esi=auto
824- AH_TEMPLATE ( [ USE_SQUID_ESI] ,[ Define to enable the ESI processor] )
825- AC_ARG_ENABLE ( esi ,
826- AS_HELP_STRING ( [ --disable-esi] ,
827- [ Disable ESI for accelerators. ESI requires expat or xml2 library.
823+ AH_TEMPLATE ( [ USE_SQUID_ESI] ,[ whether to enable ESI processing] )
824+ AC_ARG_ENABLE ( esi ,[
825+ AS_HELP_STRING ( [ --enable-esi] ,
826+ [ Enable ESI for accelerators. ESI requires expat or xml2 library.
828827 Enabling ESI will cause squid reverse proxies to be capable
829- of the Edge Acceleration Specification (www.esi.org).] ) ,
830- [ squid_opt_use_esi=$enableval] ,[ ] )
828+ of the Edge Acceleration Specification (www.esi.org).] )
829+ ] ,[
830+ SQUID_DEFINE_BOOL(USE_SQUID_ESI,$enable_esi)
831+ ] )
832+ AC_MSG_NOTICE ( [ Enable ESI processor: ${enable_esi:=no (auto)}] )
831833
832834# ESI support libraries: expat
833835AH_TEMPLATE ( HAVE_LIBEXPAT ,[ Define to 1 if you have the expat library] )
834836SQUID_AUTO_LIB(expat,[ ESI expat library] ,[ LIBEXPAT] )
835- AS_IF ( [ test "x$squid_opt_use_esi" ! = "xno " -a "x$with_expat" != "xno"] ,[
837+ AS_IF ( [ test "x$enable_esi" = "xyes " -a "x$with_expat" != "xno"] ,[
836838 SQUID_STATE_SAVE(squid_expat_state)
837839 PKG_CHECK_MODULES([ LIBEXPAT] ,[ expat] ,[ ] ,[
838840 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"],[
841843 AC_CHECK_HEADERS ( expat.h )
842844 SQUID_STATE_ROLLBACK(squid_expat_state)
843845 AS_IF ( [ test "x$LIBEXPAT_LIBS" != "x"] ,[
844- squid_opt_use_esi=yes
845846 LIBEXPAT_LIBS="$LIBEXPAT_PATH $LIBEXPAT_LIBS"
846847 AC_DEFINE ( HAVE_LIBEXPAT ,1 ,[ Define to 1 if you have the expat library] )
847848 ] ,
@@ -855,7 +856,7 @@ AC_SUBST(LIBEXPAT_LIBS)
855856# ESI support libraries: xml2
856857AH_TEMPLATE ( HAVE_LIBXML2 ,[ Define to 1 if you have the xml2 library] )
857858SQUID_AUTO_LIB(xml2,[ ESI xml2 library] ,[ LIBXML2] )
858- AS_IF ( [ test "x$squid_opt_use_esi" ! = "xno " -a "x$with_xml2" != "xno"] ,[
859+ AS_IF ( [ test "x$enable_esi" = "xyes " -a "x$with_xml2" != "xno"] ,[
859860 SQUID_STATE_SAVE([ squid_libxml2_save] )
860861 PKG_CHECK_MODULES([ LIBXML2] ,[ libxml-2.0] ,[ ] ,[
861862 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"],[
865866 SQUID_STATE_ROLLBACK([ squid_libxml2_save] )
866867
867868 AS_IF ( [ test "x$LIBXML2_LIBS" != "x"] ,[
868- squid_opt_use_esi=yes
869869 CPPFLAGS="$LIBXML2_CFLAGS $CPPFLAGS"
870870 LIBXML2_LIBS="$LIBXML2_PATH $LIBXML2_LIBS"
871871 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"],[
878878AM_CONDITIONAL(ENABLE_LIBXML2,[ test "x$LIBXML2_LIBS" != "x"] )
879879AC_SUBST ( LIBXML2_LIBS )
880880
881- AS_IF ( [ test "x$squid_opt_use_esi" = "xyes"] ,[
882- AS_IF ( [ test "x$LIBXML2_LIBS" = "x" -a "x$LIBEXPAT_LIBS" = "x"] ,[
883- AC_MSG_ERROR ( [ ESI processor requires libxml2 or libexpat] )
884- ] )
885- AC_MSG_NOTICE ( [ Enabling ESI processor: $LIBEXPAT_LIBS $LIBXML2_LIBS] )
886- AC_DEFINE ( USE_SQUID_ESI ,1 ,[ Compile the ESI processor] )
887- ] ,[
888- AS_IF ( test "x$squid_opt_use_esi" = "xno" ,[
889- AC_MSG_NOTICE ( [ Disabling ESI processor.] )
890- ] ,[
891- AC_MSG_NOTICE ( [ Disabling ESI processor. libxml2 and libexpat not found.] )
892- ] )
881+ AS_IF ( [ test "x$enable_esi" = "xyes" -a "x$LIBXML2_LIBS" = "x" -a "x$LIBEXPAT_LIBS" = "x"] ,[
882+ AC_MSG_ERROR ( [ ESI processor requires libxml2 or libexpat] )
893883] )
894- AM_CONDITIONAL(ENABLE_ESI, test "x$squid_opt_use_esi " = "xyes")
884+ AM_CONDITIONAL(ENABLE_ESI,[ test "x$enable_esi " = "xyes"] )
895885
896886AC_ARG_ENABLE ( icap-client ,
897887 AS_HELP_STRING ( [ --disable-icap-client] ,[ Disable the ICAP client.] ) ,[
0 commit comments