])
dnl Disable "memPools" code
-squid_opt_enable_mempools=yes #default
AC_ARG_ENABLE(mempools,
AS_HELP_STRING([--disable-mempools],
[Disable memPools. Note that this option now simply sets the
default behaviour. Specific classes can override this
at runtime, and only lib/MemPool.c needs to be altered
to change the squid-wide default for all classes.]), [
-SQUID_YESNO([$squid_opt_enable_mempools],
+SQUID_YESNO([$enableval],
[--disable-mempools option takes no arguments])
-squid_opt_enable_mempools=$enableval
])
-# transform positive to negative value.
-AC_MSG_NOTICE([MemPools enabled: $squid_opt_enable_mempools])
-if test "$squid_opt_enable_mempools" = "yes" ; then
- squid_opt_enable_mempools=no
-else
- squid_opt_enable_mempools=yes
-fi
-SQUID_DEFINE_UNQUOTED(DISABLE_POOLS,$squid_opt_enable_mempools,
+# notice: the definition's value meaning is INVERTED
+SQUID_DEFINE_UNQUOTED(USE_MEMPOOLS,${enable_mempools:=yes},
[Disable Memory Pools support and fall back to system malloc])
+AC_MSG_NOTICE([MemPools enabled: $enable_mempools])
dnl Enable WIN32 Service compile mode
AC_ARG_ENABLE(win32-service,
fi
# Disable "unlinkd" code
-squid_opt_enable_unlinkd=yes
AC_ARG_ENABLE(unlinkd,
AS_HELP_STRING([--disable-unlinkd],[Do not use unlinkd]), [
SQUID_YESNO([$enableval],
[unrecognized argument to --disable-unlinkd: $enableval])
-squid_opt_enable_unlinkd=$enableval
])
-AC_MSG_NOTICE([unlinkd enabled: $squid_opt_enable_unlinkd])
-SQUID_DEFINE_UNQUOTED([USE_UNLINKD],$squid_opt_enable_unlinkd,
+SQUID_DEFINE_UNQUOTED([USE_UNLINKD],${enable_unlinkd:=yes},
[Enable useage of unlinkd])
-AM_CONDITIONAL(ENABLE_UNLINKD,test "$squid_opt_enable_unlinkd" = "yes")
+AM_CONDITIONAL(ENABLE_UNLINKD,test "$enable_unlinkd" = "yes")
+AC_MSG_NOTICE([unlinkd enabled: $enable_unlinkd])
# Enable backtraces on fatal errors
AC_ARG_ENABLE(stacktraces,