Propagate Joerg's fix to make --enable-extra-gcc-checks turn off
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 22 Apr 2007 23:52:38 +0000 (23:52 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 22 Apr 2007 23:52:38 +0000 (23:52 +0000)
--enable-warnings-as-errors (if any tests enabled by
--enable-extra-gcc-checks are safe to treat as errors, they're safe to
turn on by default).

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

wiretap/configure.in

index 117135bab953b57453550dea73f1ffccfd828fe9..f0c7dad22a178b5bc2ea789b1ed01e98ed31b0f0 100644 (file)
@@ -30,6 +30,7 @@ AC_ARG_ENABLE(extra-gcc-checks,
   AC_HELP_STRING( [--enable-extra-gcc-checks],
                  [Do additional -W checks in GCC.  @<:@default=no@:>@]),
 [
+       wiretap_extra_gcc_flags=$enableval
        if test $enableval != no
        then
                AC_WIRETAP_GCC_CFLAGS_CHECK(-pedantic)
@@ -69,7 +70,7 @@ AC_ARG_ENABLE(warnings-as-errors,
   AC_HELP_STRING( [--enable-warnings-as-errors],
                   [Treat warnings as errors (only for gcc). @<:@default=yes@:>@]),
 [
-  if test "x$GCC" = "xyes" && test "x$enableval" == "xyes"; then
+  if test "x$GCC" = "xyes" -a "x$enableval" == "xyes" -a "x$wireshark_extra_gcc_flags" != "xyes"; then
     with_warnings_as_errors="yes"
     AC_MSG_RESULT(yes)
   else
@@ -77,7 +78,7 @@ AC_ARG_ENABLE(warnings-as-errors,
     AC_MSG_RESULT(no)
   fi
 ],
-  if test "x$GCC" = "xyes" && test "x$wireshark_extra_gcc_flags" = "x"; then
+  if test "x$GCC" = "xyes" -a "x$wireshark_extra_gcc_flags" = "x"; then
     with_warnings_as_errors="yes"
     AC_MSG_RESULT(yes)
   else