aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--wiretap/configure.in20
1 files changed, 11 insertions, 9 deletions
diff --git a/wiretap/configure.in b/wiretap/configure.in
index 0f978d8fbd..8c47fdbaf5 100644
--- a/wiretap/configure.in
+++ b/wiretap/configure.in
@@ -84,17 +84,19 @@ fi
rm -rf conftest*
AC_ARG_WITH(warnings-as-errors,
-[ --with-warnings-as-errors Treat warnings as errors (if using gcc). [default=no]],
-[
+ AC_HELP_STRING( [--without-warnings-as-errors],
+ [Don't treat warnings as errors (only for gcc). [default=yes]]),
+[
+ without_warnings_as_errors="no"
+ if test "x$GCC" != "x" && test "x$withval" = "xno"; then
+ without_warnings_as_errors="yes"
+ fi
+],
if test "x$GCC" != "x"; then
- if test "x$withval" != "xno"; then
- with_warnings_as_errors="yes"
- fi
- else
- with_warnings_as_errors="no"
+ without_warnings_as_errors="no"
fi
-],)
-AM_CONDITIONAL(HAVE_WARNINGS_AS_ERRORS, test "x$with_warnings_as_errors" = "xyes")
+)
+AM_CONDITIONAL(HAVE_WARNINGS_AS_ERRORS, test "x$without_warnings_as_errors" = "xno")
#
# Add any platform-specific compiler flags needed.