Fix regression: Automatically disable -Werror in case of extra gcc flags.
authorjmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 22 Apr 2007 23:01:49 +0000 (23:01 +0000)
committerjmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 22 Apr 2007 23:01:49 +0000 (23:01 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21513 f5534014-38df-0310-8fa8-9805f1628bb7

configure.in

index 71f65cfa9fc04d45e960161d78dd8cd6ae726044..1f49064ee01e71ba0c141174f5cd90afbc3fbe9e 100644 (file)
@@ -154,6 +154,7 @@ AC_ARG_ENABLE(extra-gcc-checks,
   AC_HELP_STRING( [--enable-extra-gcc-checks],
                  [Do additional -W checks in GCC.  @<:@default=no@:>@]),
 [
+       wireshark_extra_gcc_flags=$enableval
        if test $enableval != no
        then
          AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wcast-qual)
@@ -192,7 +193,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
@@ -200,7 +201,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