]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
--disable-optimizations option to force compiler optimizations (including
authorhno <>
Sun, 6 Jul 2003 20:56:12 +0000 (20:56 +0000)
committerhno <>
Sun, 6 Jul 2003 20:56:12 +0000 (20:56 +0000)
inlining) to be disabled. Very useful for debugging.

configure.in

index e11bd1c36242f5cfe2654cc1f83a966a810445ca..e446b6ebb4983d89cf71a783fc941d674db4d463 100644 (file)
@@ -3,7 +3,7 @@ dnl  Configuration input file for Squid
 dnl
 dnl  Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9)
 dnl
-dnl  $Id: configure.in,v 1.335 2003/06/09 02:52:25 robertc Exp $
+dnl  $Id: configure.in,v 1.336 2003/07/06 14:56:12 hno Exp $
 dnl
 dnl
 dnl
@@ -13,7 +13,7 @@ AC_CONFIG_SRCDIR([src/main.cc])
 AC_CONFIG_AUX_DIR(cfgaux)
 AM_INIT_AUTOMAKE(squid, 3.0.DEVEL-CVS)
 AM_CONFIG_HEADER(include/autoconf.h)
-AC_REVISION($Revision: 1.335 $)dnl
+AC_REVISION($Revision: 1.336 $)dnl
 AC_PREFIX_DEFAULT(/usr/local/squid)
 AM_MAINTAINER_MODE
 
@@ -238,9 +238,26 @@ AC_ARG_ENABLE(gnuregex,
 [USE_GNUREGEX=$enableval])
 
 SquidInline="yes"
+
+AC_ARG_ENABLE(optimizations,
+[  --disable-optimizations Don't compile Squid with compiler optimizations enabled.
+                            Optimization is good for production builds, but not
+                            good for debugging. During development, use
+                            --disable-optimizations to reduce compilation times
+                            and allow easier debugging. This option implicitly
+                            also enabled --disable-inline],
+[ if test "$enableval" = "no" ; then
+       echo "Disabling compiler optimizations (-O flag)"
+       CFLAGS="`echo $CFLAGS | sed -e 's/-O[[0-9]]*//'`"
+       CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-O[[0-9]]*//'`"
+        SquidInline="no"
+  fi
+])
+
 AC_ARG_ENABLE(inline,
 [  --disable-inline        Don't compile trivial methods as inline. Squid
-                            is coded with much of the code able to be inlined.<                             Inlining is good for production builds, but not
+                            is coded with much of the code able to be inlined.
+                            Inlining is good for production builds, but not
                             good for development. During development, use
                             --disable-inline to reduce compilation times and
                             allow incremental builds to be quick. For
@@ -256,6 +273,7 @@ if test "$SquidInline" = "yes" ; then
     AC_DEFINE(_SQUID_INLINE_, inline, [Keyword used by squid for inlining methods])
     AC_DEFINE(_USE_INLINE_,, [Include inline methods into header file])
 else
+    echo "Inlining optimization disabled"
     AC_DEFINE(_SQUID_INLINE_,, [Keyword used by squid for inlining methods])
 fi