From Sebastien Tandel:
authorsfisher <sfisher@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 23 Mar 2007 17:49:59 +0000 (17:49 +0000)
committersfisher <sfisher@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 23 Mar 2007 17:49:59 +0000 (17:49 +0000)
(Temporarily disable the warnings as errors default on Unix to get
to get the buildbots and people with gcc40 going again until those
additional warnings gcc40 generates can be fixed-I'm working on it
ASAP)

   Patch for configure.in which disables by default the treatment of
warnings as errors.
It can be enabled with './configure --with-warnings-as-errors'.
The macro will test first if GCC is present. If it's the case,
HAVE_WARNINGS_AS_ERRORS is defined. All the USING_GCC have been replaced
by HAVE_WARNINGS_AS_ERRORS.
With this switch, people won't suffer from unexpected warnings when
downloading svn sources during the transition time ;)

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21153 f5534014-38df-0310-8fa8-9805f1628bb7

31 files changed:
Makefile.am
codecs/Makefile.am
configure.in
epan/crypt/Makefile.am
epan/dfilter/Makefile.am
epan/ftypes/Makefile.am
epan/wslua/Makefile.am
plugins/agentx/Makefile.am
plugins/artnet/Makefile.am
plugins/asn1/Makefile.am
plugins/ciscosm/Makefile.am
plugins/docsis/Makefile.am
plugins/enttec/Makefile.am
plugins/gryphon/Makefile.am
plugins/h223/Makefile.am
plugins/irda/Makefile.am
plugins/lwres/Makefile.am
plugins/megaco/Makefile.am
plugins/mgcp/Makefile.am
plugins/opsi/Makefile.am
plugins/pcli/Makefile.am
plugins/profinet/Makefile.am
plugins/rlm/Makefile.am
plugins/rtnet/Makefile.am
plugins/rudp/Makefile.am
plugins/sbus/Makefile.am
plugins/stats_tree/Makefile.am
plugins/tpg/Makefile.am
plugins/v5ua/Makefile.am
wiretap/Makefile.am
wiretap/configure.in

index c742ab001942f3816efb84944a820cd7b0208b5a..f57154209e865325880fdf6e6560b392f255178b 100644 (file)
@@ -25,7 +25,7 @@ ACLOCAL_AMFLAGS = `./aclocal-flags`
 
 INCLUDES= @LUA_INCLUDES@
 
-if USING_GCC
+if HAVE_WARNINGS_AS_ERRORS
 AM_CFLAGS = -Werror
 endif
 
index a68fd61a63be8f9347b6bde7e3a5ec45858c11cf..07dc6098a2c66a9afb762fd59a0246702169860a 100644 (file)
@@ -21,7 +21,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
-if USING_GCC
+if HAVE_WARNINGS_AS_ERRORS
 AM_CFLAGS = -Werror
 endif
 
index e9602ad59315894fb6f831eb1b46b59c7528c8fe..5dd3a58179e31dd1e17d5d9721bd2622d803cb74 100644 (file)
@@ -174,8 +174,18 @@ else
   AC_MSG_RESULT(no)
 fi
 
-# Create the USING_GCC variable for use in Makefile.am files
-AM_CONDITIONAL(USING_GCC, test "x$GCC" != "x")
+AC_ARG_WITH(warnings-as-errors,
+[  --with-warnings-as-errors Treat warnings as errors (if using gcc). [default=no]],
+[  
+  if test "x$GCC" != "x"; then
+    if test "x$withval" != "xno"; then
+      with_warnings_as_errors="yes"
+    fi
+  else
+    with_warnings_as_errors="no"
+  fi
+],)
+AM_CONDITIONAL(HAVE_WARNINGS_AS_ERRORS, test "x$with_warnings_as_errors" = "xyes")
 
 #
 # Add any platform-specific compiler flags needed.
index 6c46fefcabedffd314ca7298ebcd6fcc13e3e3af..e07f9a4efbd216c7c255071ad833e162283518ea 100644 (file)
@@ -25,7 +25,7 @@ INCLUDES = -I$(top_srcdir)
 
 include Makefile.common
 
-if USING_GCC
+if HAVE_WARNINGS_AS_ERRORS
 AM_CFLAGS = -Werror
 endif
 
index 09d80c87525e8960729a85c80ad732283477c656..80fb3ed8306eef1114bbf8e4edba05ec60303b2a 100644 (file)
@@ -21,7 +21,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
-if USING_GCC
+if HAVE_WARNINGS_AS_ERRORS
 AM_CFLAGS = -Werror
 endif
 
index ff07f73a58e1cfb1d9416d0cf7b2e04a374ec899..c2ba9a85d45e7170599f25b8e1f8308661abd73d 100644 (file)
@@ -21,7 +21,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
-if USING_GCC
+if HAVE_WARNINGS_AS_ERRORS
 AM_CFLAGS = -Werror
 endif
 
index 919a318ed22ce0a9d2374cfb524e45ca5461348e..8c937141a0e02c4eeb829a92a89555cfb78b956d 100644 (file)
@@ -21,7 +21,7 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #
 
-if USING_GCC
+if HAVE_WARNINGS_AS_ERRORS
 AM_CFLAGS = -Werror
 endif
 
index b1cb3737d9bf8226e2707573bbddcfb99a959053..351f1d2ce050280861b343a1ee5208ceb6dc152d 100644 (file)
@@ -26,7 +26,7 @@ INCLUDES = -I$(top_srcdir) -I$(includedir)
 
 include Makefile.common
 
-if USING_GCC
+if HAVE_WARNINGS_AS_ERRORS
 AM_CFLAGS = -Werror
 endif
 
index e0d3ff7d1c23880d8db77361da57992a69643cb9..a1939cc2bfc08a263152b8155b18e194048bd39f 100644 (file)
@@ -26,7 +26,7 @@ INCLUDES = -I$(top_srcdir) -I$(includedir)
 
 include Makefile.common
 
-if USING_GCC
+if HAVE_WARNINGS_AS_ERRORS
 AM_CFLAGS = -Werror
 endif
 
index e63a5700965126af4ad129a1258c49f4a2e5147e..4404bbdd743d804e6f0b2acb585071fcd1a3b70e 100644 (file)
@@ -26,12 +26,10 @@ INCLUDES = -I$(top_srcdir) -I$(includedir)
 
 include Makefile.common
 
-if USING_GCC
+if HAVE_WARNINGS_AS_ERRORS
 AM_CFLAGS = -Werror
 endif
 
-plugindir = @plugindir@
-
 plugin_LTLIBRARIES = asn1.la
 asn1_la_SOURCES = \
        plugin.c \
index a915b4bbe040ec490adaeaa4d3dfeba72041c06d..d0bf7a8cd725b05345c190422aeb2d2b898408c4 100644 (file)
@@ -27,7 +27,8 @@ INCLUDES = -I$(top_srcdir) -I$(includedir)
 
 include Makefile.common
 
-if USING_GCC
+
+if HAVE_WARNINGS_AS_ERRORS
 AM_CFLAGS = -Werror
 endif
 
index 10816545c03a83db7651c8097aa79c1b0de9dc15..67a83ff1447a46426431935c2eb09e864670cefd 100644 (file)
@@ -26,7 +26,7 @@ INCLUDES = -I$(top_srcdir) -I$(includedir)
 
 include Makefile.common
 
-if USING_GCC
+if HAVE_WARNINGS_AS_ERRORS
 AM_CFLAGS = -Werror
 endif
 
index 8f0fa033151c397201669600a1c8857c1598b916..74aada83f8156fb86fae0b63be635dac8b800052 100644 (file)
@@ -26,7 +26,7 @@ INCLUDES = -I$(top_srcdir) -I$(includedir)
 
 include Makefile.common
 
-if USING_GCC
+if HAVE_WARNINGS_AS_ERRORS
 AM_CFLAGS = -Werror
 endif
 
index bd8fba3b6f4ad5e0ed2dc9d4a87e8b7c614999c5..b6a28adeba9ff4f70fff4162523a2db6b8cf4552 100644 (file)
@@ -28,7 +28,7 @@ INCLUDES = -I$(top_srcdir) -I$(includedir)
 
 include Makefile.common
 
-if USING_GCC
+if HAVE_WARNINGS_AS_ERRORS
 AM_CFLAGS = -Werror
 endif
 
index c965b25742c7d9a804d3da01ea2ae7d981ebf635..c0e1bbba8e67608a45949630871de97f0397efb6 100644 (file)
@@ -26,7 +26,7 @@ INCLUDES = -I$(top_srcdir) -I$(includedir)
 
 include Makefile.common
 
-if USING_GCC
+if HAVE_WARNINGS_AS_ERRORS
 AM_CFLAGS = -Werror
 endif
 
index 47efd1cc48dd3cff244aa16153a0874039e9041f..933001536f3059d2c7750812fbfb6c7390229157 100644 (file)
@@ -26,7 +26,7 @@ INCLUDES = -I$(top_srcdir) -I$(includedir)
 
 include Makefile.common
 
-if USING_GCC
+if HAVE_WARNINGS_AS_ERRORS
 AM_CFLAGS = -Werror
 endif
 
index b23636f5a6a2d0dba902bacb3f706fd4b9cc0f5a..8a586f57bd7a1861a5d509a21fe507ed91b49ce2 100644 (file)
@@ -26,7 +26,7 @@ INCLUDES = -I$(top_srcdir) -I$(includedir)
 
 include Makefile.common
 
-if USING_GCC
+if HAVE_WARNINGS_AS_ERRORS
 AM_CFLAGS = -Werror
 endif
 
index 344f7c06a10ce5629a4f529017c72d9e8baca5e9..6e950bb7f0155a032e77763ac5cbdac8058b147c 100644 (file)
@@ -26,7 +26,7 @@ INCLUDES = -I$(top_srcdir) -I$(includedir)
 
 include Makefile.common
 
-if USING_GCC
+if HAVE_WARNINGS_AS_ERRORS
 AM_CFLAGS = -Werror
 endif
 
index 02e8593f9f936005173bda54d58fcda433b74595..c006aebb1d4c1805a0787546b01acb7e30f5b74f 100644 (file)
@@ -26,7 +26,7 @@ INCLUDES = -I$(top_srcdir) -I$(includedir)
 
 include Makefile.common
 
-if USING_GCC
+if HAVE_WARNINGS_AS_ERRORS
 AM_CFLAGS = -Werror
 endif
 
index 37fa0e3fafff0a04470d099608f72ed2605375a9..20b992260a7ab7fa26441138812abe5f6697cc43 100644 (file)
@@ -26,7 +26,7 @@ INCLUDES = -I$(top_srcdir) -I$(includedir)
 
 include Makefile.common
 
-if USING_GCC
+if HAVE_WARNINGS_AS_ERRORS
 AM_CFLAGS = -Werror
 endif
 
index 368b8f7e29232e4dc587295e4c48af9fa7c2ab06..f634bfe0a088e91e1cbdc2bbaf64f3e283fd3c24 100644 (file)
@@ -26,7 +26,7 @@ INCLUDES = -I$(top_srcdir) -I$(includedir)
 
 include Makefile.common
 
-if USING_GCC
+if HAVE_WARNINGS_AS_ERRORS
 AM_CFLAGS = -Werror
 endif
 
index 219f3850db93a847ffedcc26daed481b34fe424f..fe5f188122425612c585b4dca294e3a5f55da165 100644 (file)
@@ -26,7 +26,7 @@ INCLUDES = -I$(top_srcdir) -I$(includedir)
 
 include Makefile.common
 
-if USING_GCC
+if HAVE_WARNINGS_AS_ERRORS
 AM_CFLAGS = -Werror
 endif
 
index 8a6d01632e939155dc438483354ff55a5dc651dd..c98ba9648ea07f32d2f0b5e782f009f91594b494 100644 (file)
@@ -27,7 +27,7 @@ INCLUDES = -I$(top_srcdir) -I$(includedir)
 
 include Makefile.common
 
-if USING_GCC
+if HAVE_WARNINGS_AS_ERRORS
 AM_CFLAGS = -Werror
 endif
 
index 4ec2a58de59d2a5db01f20a969793d7503ed8e8a..1ea43f89b7f12ed88bd92f1631e6ca85a2aa6878 100644 (file)
@@ -26,7 +26,7 @@ INCLUDES = -I$(top_srcdir) -I$(includedir)
 
 include Makefile.common
 
-if USING_GCC
+if HAVE_WARNINGS_AS_ERRORS
 AM_CFLAGS = -Werror
 endif
 
index 6c07e7f5387c388fd81f3f21b6db6f0e5def55d0..df967f71aa8a29a18c5673e952de95412aceb69a 100644 (file)
@@ -27,7 +27,7 @@ INCLUDES = -I$(top_srcdir) -I$(includedir)
 
 include Makefile.common
 
-if USING_GCC
+if HAVE_WARNINGS_AS_ERRORS
 AM_CFLAGS = -Werror
 endif
 
index f10fba9414da73476d944ed10e88693dc95b19f7..f4ef1295125654f6ce8259cc5e57263abb72cfc5 100644 (file)
@@ -25,7 +25,7 @@ INCLUDES = -I$(top_srcdir) -I$(includedir)
 
 include Makefile.common
 
-if USING_GCC
+if HAVE_WARNINGS_AS_ERRORS
 AM_CFLAGS = -Werror
 endif
 
index 84d1d72e4a871ff7ba998dfe707b2bc76913eb05..0ce23fa85e0bed8663a6983cca88f34166acf690 100644 (file)
@@ -26,7 +26,7 @@ INCLUDES = -I$(top_srcdir)
 
 include Makefile.common
 
-if USING_GCC
+if HAVE_WARNINGS_AS_ERRORS
 AM_CFLAGS = -Werror
 endif
 
index be672ecb6a4aec5518d7d4e868fbb9edd8dd7c8c..30e6bfd8b8ac783566f52bb456b482270f087fc2 100644 (file)
@@ -22,7 +22,7 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #
 
-if USING_GCC
+if HAVE_WARNINGS_AS_ERRORS
 AM_CFLAGS = -Werror
 endif
 
index 2f551e6692939a97a7442470af0d068253fa766a..b43020ebaf9c49296bcbec6a9b303c73cf87968f 100644 (file)
@@ -26,7 +26,7 @@ INCLUDES = -I$(top_srcdir) -I$(includedir)
 
 include Makefile.common
 
-if USING_GCC
+if HAVE_WARNINGS_AS_ERRORS
 AM_CFLAGS = -Werror
 endif
 
index f68b6f4470e646f1b75b745c829419e01e1aae87..3f985cf6220b8e7c06c93d01effd547e2c9c0e6e 100644 (file)
@@ -25,7 +25,7 @@ ACLOCAL_AMFLAGS = `../aclocal-flags`
 
 include Makefile.common
 
-if USING_GCC
+if HAVE_WARNINGS_AS_ERRORS
 AM_CFLAGS = -Werror
 endif
 
index 09abc989894cb20c2f8dc73b330945ab77dbf7ca..8edf8b72bb469f31cea8f753fb9b755bd056efca 100644 (file)
@@ -49,8 +49,18 @@ else
   AC_MSG_RESULT(no)
 fi
 
-# Create the USING_GCC variable for use in Makefile.am files
-AM_CONDITIONAL(USING_GCC, test "x$GCC" != "x")
+AC_ARG_WITH(warnings-as-errors,
+[  --with-warnings-as-errors Treat warnings as errors (if using gcc). [default=no]],
+[  
+  if test "x$GCC" != "x"; then
+    if test "x$withval" != "xno"; then
+      with_warnings_as_errors="yes"
+    fi
+  else
+    with_warnings_as_errors="no"
+  fi
+],)
+AM_CONDITIONAL(HAVE_WARNINGS_AS_ERRORS, test "x$with_warnings_as_errors" = "xyes")
 
 #
 # Add any platform-specific compiler flags needed.