Same as for top level configure.in

svn path=/trunk/; revision=21426
This commit is contained in:
Jörg Mayer 2007-04-14 00:41:08 +00:00
parent 6c8b972c62
commit d5b5c41fa9
1 changed files with 16 additions and 8 deletions

View File

@ -83,20 +83,28 @@ else
fi fi
rm -rf conftest* rm -rf conftest*
AC_MSG_CHECKING(whether we should treat compiler warnings as errors)
AC_ARG_WITH(warnings-as-errors, AC_ARG_WITH(warnings-as-errors,
AC_HELP_STRING( [--without-warnings-as-errors], AC_HELP_STRING( [--with-warnings-as-errors],
[Don't treat warnings as errors (only for gcc). [default=yes]]), [Treat warnings as errors (only for gcc). [default=yes]]),
[ [
without_warnings_as_errors="no" if test "x$GCC" != "x" && test "x$withval" != "xno"; then
if test "x$GCC" != "x" && test "x$withval" = "xno"; then with_warnings_as_errors="no"
without_warnings_as_errors="yes" AC_MSG_RESULT(no)
else
with_warnings_as_errors="yes"
AC_MSG_RESULT(yes)
fi fi
], ],
if test "x$GCC" != "x"; then if test "x$GCC" != "x" && test "x$wireshark_extra_gcc_flags" = "x"; then
without_warnings_as_errors="no" with_warnings_as_errors="yes"
AC_MSG_RESULT(yes)
else
with_warnings_as_errors="no"
AC_MSG_RESULT(no)
fi fi
) )
AM_CONDITIONAL(HAVE_WARNINGS_AS_ERRORS, test "x$without_warnings_as_errors" = "xno") AM_CONDITIONAL(HAVE_WARNINGS_AS_ERRORS, test "x$with_warnings_as_errors" = "xyes")
# #
# Add any platform-specific compiler flags needed. # Add any platform-specific compiler flags needed.