8202325: [aix] disable warnings-as-errors by default
Reviewed-by: goetz, erikj, ihse
--- a/make/autoconf/flags-cflags.m4 Thu Apr 26 20:42:43 2018 +0200
+++ b/make/autoconf/flags-cflags.m4 Thu Apr 26 15:41:48 2018 +0200
@@ -128,16 +128,22 @@
AC_ARG_ENABLE([warnings-as-errors], [AS_HELP_STRING([--disable-warnings-as-errors],
[do not consider native warnings to be an error @<:@enabled@:>@])])
+ # Set default value.
+ if test "x$TOOLCHAIN_TYPE" = xxlc; then
+ WARNINGS_AS_ERRORS=false
+ else
+ WARNINGS_AS_ERRORS=true
+ fi
+
AC_MSG_CHECKING([if native warnings are errors])
if test "x$enable_warnings_as_errors" = "xyes"; then
AC_MSG_RESULT([yes (explicitly set)])
WARNINGS_AS_ERRORS=true
elif test "x$enable_warnings_as_errors" = "xno"; then
- AC_MSG_RESULT([no])
+ AC_MSG_RESULT([no (explicitly set)])
WARNINGS_AS_ERRORS=false
elif test "x$enable_warnings_as_errors" = "x"; then
- AC_MSG_RESULT([yes (default)])
- WARNINGS_AS_ERRORS=true
+ AC_MSG_RESULT([${WARNINGS_AS_ERRORS} (default)])
else
AC_MSG_ERROR([--enable-warnings-as-errors accepts no argument])
fi