]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Refafctored --enable-x-accelerator-vary option handling.
authorFrancesco Chemolli <kinkie@squid-cache.org>
Fri, 9 Apr 2010 18:08:48 +0000 (20:08 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Fri, 9 Apr 2010 18:08:48 +0000 (20:08 +0200)
configure.in

index f2afc2c95c2a10739a639c052b510ef508c1b46e..030fde7c58e45f956ec8015b1ed082e4f7ff2110 100644 (file)
@@ -2074,7 +2074,7 @@ SQUID_DEFINE_UNQUOTED([PRINT_STACK_TRACE],$squid_opt_enable_stacktraces,
                       [Print stack traces on fatal errors])
 
 
-# Enable USE_XPROF_STATS
+# CPU Profiling options handling
 squid_opt_enable_cpu_profiling=no
 AC_ARG_ENABLE(cpu-profiling,
   AS_HELP_STRING([--enable-cpu-profiling],
@@ -2097,18 +2097,22 @@ SQUID_DEFINE_UNQUOTED([USE_XPROF_STATS],$squid_opt_enable_cpu_profiling,
 AM_CONDITIONAL(ENABLE_XPROF_STATS,
                test $squid_opt_enable_cpu_profiling = "yes")
 
-dnl Enable X-Accelerator-Vary for Vary support within an accelerator setup
+# Enable X-Accelerator-Vary for Vary support within an accelerator setup
+squid_opt_enable_x_accelerator_vary=no
 AC_ARG_ENABLE(x-accelerator-vary,
-  AS_HELP_STRING([--enable-x-accelerator-vary],[Enable support for the X-Accelerator-Vary
+  AS_HELP_STRING([--enable-x-accelerator-vary],
+                 [Enable support for the X-Accelerator-Vary
                   HTTP header. Can be used to indicate
                   variance within an accelerator setup.
                   Typically used together with other code
-                  that adds custom HTTP headers to the requests.]),
-[ if test "$enableval" = "yes" ; then
-    AC_MSG_NOTICE([Enabling support for X-Accelerator-Vary])
-    AC_DEFINE(X_ACCELERATOR_VARY, 1, [Enable support for the X-Accelerator-Vary HTTP header])
-  fi
+                  that adds custom HTTP headers to the requests.]), [
+SQUID_YESNO([$enableval],
+            [unrecognized argument to --enable-x-accelerator-vary: $enableval])
+squid_opt_enable_x_accelerator_vary=$enableval
 ])
+AC_MSG_NOTICE([X-Accelerator-Vary support enabled: $squid_opt_enable_x_accelerator_vary])
+SQUID_DEFINE_UNQUOTED([X_ACCELERATOR_VARY],$squid_opt_enable_x_accelerator_vary,
+                      [Enable support for the X-Accelerator-Vary HTTP header])
 
 AC_ARG_ENABLE(zph-qos,
   AS_HELP_STRING([--enable-zph-qos],[Enable ZPH QOS support]),