]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Implemented --disable-strict-error-checking configure option
authorFrancesco Chemolli <kinkie@squid-cache.org>
Tue, 17 Nov 2009 15:43:05 +0000 (16:43 +0100)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Tue, 17 Nov 2009 15:43:05 +0000 (16:43 +0100)
configure.in

index 50b765ed46a7ea3e5ffcbf090f18aea4ed33cc99..0e5af0bbf0db7649417d4ecf09fb278ef5dfeced 100644 (file)
@@ -279,10 +279,14 @@ dnl TODO: check if the problem will be present in any other newer MinGW release.
         SQUID_CFLAGS="-Wall -Wpointer-arith -Wwrite-strings -Wcomments"
        ;;
     *)
-        SQUID_CFLAGS="-Werror -Wall -Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wcomments"
+        SQUID_CFLAGS="-Wall -Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wcomments"
        ;;
     esac
-    SQUID_CXXFLAGS="-Werror -Wall -Wpointer-arith -Wwrite-strings -Wcomments"
+    SQUID_CXXFLAGS="-Wall -Wpointer-arith -Wwrite-strings -Wcomments"
+    if [ "$squid_disable_werror" = "no" ]; then
+        SQUID_CFLAGS="$SQUID_CFLAGS -Werror"
+        SQUID_CXXFLAGS="$SQUID_CXXFLAGS -Werror"
+    fi
 else
     SQUID_CFLAGS=
     SQUID_CXXFLAGS=
@@ -346,6 +350,16 @@ AC_ARG_ENABLE(inline,
    fi
 ])
 
+squid_disable_werror="no"
+AC_ARG_ENABLE(strict-error-checking,
+  AS_HELP_STRING([--disable-strict-error-checking],[By default squid is compiled
+                 with all possible static compiler error-checks enbled.
+                 This flag disables the behavior]),
+[ if test "$enableval" = "no" ; then
+  squid_disable_werror="yes"
+  fi
+])
+
 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])