]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Improved stackraces configuration options handling.
authorFrancesco Chemolli <kinkie@squid-cache.org>
Sun, 4 Apr 2010 17:16:20 +0000 (19:16 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Sun, 4 Apr 2010 17:16:20 +0000 (19:16 +0200)
1  2 
configure.in
src/tools.cc

diff --cc configure.in
index 1ab80f2d573acc8a7711915a68502560c76154b5,c69c2a92221d096ad5caeb7424ea838078fd2c43..aba5da5fc7b0a66a5cff041ddbc564d4f1db72c2
@@@ -2045,36 -2046,25 +2046,27 @@@ if test "$require_sasl" = "yes"; the
        AC_SUBST(LIBSASL)
  fi
  
- dnl Disable "unlinkd" code
+ # Disable "unlinkd" code
+ squid_opt_enable_unlinkd=yes
  AC_ARG_ENABLE(unlinkd,
--  AS_HELP_STRING([--disable-unlinkd],[Do not use unlinkd]),
- [ if test "$enableval" = "no" ; then
-     use_unlinkd=no
-   else
-     use_unlinkd=yes
-   fi
- ],[
-     # Here we should probably use some magic depending on the selected
-     # storage models
-     use_unlinkd=yes
 -[ SQUID_YESNO([$enableval],[unrecognized argument to --disable-unlinkd: $enableval])
++  AS_HELP_STRING([--disable-unlinkd],[Do not use unlinkd]), [
++SQUID_YESNO([$enableval],[unrecognized argument to --disable-unlinkd: $enableval])
+ squid_opt_enable_unlinkd=$enableval
  ])
- if test "$use_unlinkd" = "yes"; then
-     AC_MSG_NOTICE([unlinkd enabled])
-     AC_DEFINE(USE_UNLINKD,1,[Define this if unlinkd is required (strongly recommended for ufs storage type)])
-     AM_CONDITIONAL(ENABLE_UNLINKD, true)
- else
-     AC_MSG_NOTICE([unlinkd disabled])
-     AM_CONDITIONAL(ENABLE_UNLINKD, false)
- fi
+ AC_MSG_NOTICE([unlinkd enabled: $squid_opt_enable_unlinkd])
+ SQUID_DEFINE_UNQUOTED([USE_UNLINKD],$squid_opt_enable_unlinkd,[Enable useage of unlinkd])
+ AM_CONDITIONAL(ENABLE_UNLINKD,test $squid_opt_enable_unlinkd = "yes")
  
  dnl Enable backtraces on fatal errors
++squid_opt_enable_stacktraces=no
  AC_ARG_ENABLE(stacktraces,
--  AS_HELP_STRING([--enable-stacktraces],[Enable automatic call backtrace on fatal errors]),
--[ if test "$enableval" = "yes" ; then
--    AC_MSG_NOTICE([Enabling automatic stack backtraces on fatal errors])
--    AC_DEFINE(PRINT_STACK_TRACE, 1,[Print stacktraces on fatal errors])
--  fi
++  AS_HELP_STRING([--enable-stacktraces],[Enable automatic call backtrace on fatal errors]), [
++SQUID_YESNO([$enableval],[unrecognized argument to --enable-stacktraces: $enableval])
++squid_opt_enable_stacktraces=$enableval
  ])
++AC_MSG_NOTICE([Automatically print stack trace on fatal errors: $squid_opt_enable_stacktraces])
++SQUID_DEFINE_UNQUOTED([PRINT_STACK_TRACE],$squid_opt_enable_stacktraces,[Print stack traces on fatal errors])
++
  
  AM_CONDITIONAL(ENABLE_XPROF_STATS, false)
  dnl Enable USE_XPROF_STATS
diff --cc src/tools.cc
index 5d310ce86861131f6ce7a55c1f50cbccdf5fff20,5d310ce86861131f6ce7a55c1f50cbccdf5fff20..0d16240d43b1db05373052383bd62048fe7c1a39
@@@ -336,7 -336,7 +336,7 @@@ death(int sig
      else
          fprintf(debug_log, "FATAL: Received signal %d...dying.\n", sig);
  
--#ifdef PRINT_STACK_TRACE
++#if PRINT_STACK_TRACE
  #ifdef _SQUID_HPUX_
      {
          extern void U_STACK_TRACE(void);      /* link with -lcl */