From: Francesco Chemolli Date: Sat, 3 Apr 2010 19:15:08 +0000 (+0200) Subject: Refactored mempools option handling X-Git-Tag: SQUID_3_2_0_1~310^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=054a4caa32c600e223745097841f1c8f7289f1ca;p=thirdparty%2Fsquid.git Refactored mempools option handling --- diff --git a/configure.in b/configure.in index 1e0f5213ce..1ab80f2d57 100644 --- a/configure.in +++ b/configure.in @@ -2000,24 +2000,27 @@ AC_ARG_WITH(valgrind-debug, dnl Disable "memPools" code 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.]), -[ if test "$enableval" = "no" ; then - AC_MSG_NOTICE([memPools disabled]) - AC_DEFINE(DISABLE_POOLS, 1, [Define if you have problems with memPools and want to disable Pools]) - else - AC_DEFINE(DISABLE_POOLS, 0, [Define if you have problems with memPools and want to disable Pools.]) - fi -], -[ AC_DEFINE(DISABLE_POOLS, 0, [Define if you have problems with memPools and want to disable Pools.]) -]) + 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_opt_enable_mempools=$enableval ] ) +SQUID_YESNO([$squid_opt_enable_mempools],[--disable-mempools option takes no arguments]) +# 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, + [Disable Memory Pools support and fall back to system malloc]) dnl Enable WIN32 Service compile mode AC_ARG_ENABLE(win32-service, - AS_HELP_STRING([--enable-win32-service],[Compile Squid as a WIN32 Service. - Works only on MS-Windows platforms (NT and up).]), + AS_HELP_STRING([--enable-win32-service], + [Compile Squid as a WIN32 Service. Works only on MS-Windows platforms]), [ if test "$enableval" = "yes" ; then AC_MSG_NOTICE([Enabling WIN32 run service mode]) AC_DEFINE(USE_WIN32_SERVICE,1,[Define Windows NT & Windows 2000 run service mode])