From 83878efce2ac830e4fb8640ef1dcc3171c830b4a Mon Sep 17 00:00:00 2001 From: John Zaitseff Date: Mon, 6 Aug 2018 20:29:09 +1000 Subject: [PATCH] Update to the latest (unreleased) version of ax_cflags_warn_all.m4 --- m4/ax_cflags_warn_all.m4 | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/m4/ax_cflags_warn_all.m4 b/m4/ax_cflags_warn_all.m4 index 3d80a4d..5fe87c0 100644 --- a/m4/ax_cflags_warn_all.m4 +++ b/m4/ax_cflags_warn_all.m4 @@ -79,7 +79,7 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 17 +#serial 18 AC_DEFUN([AX_FLAGS_WARN_ALL], [ AX_REQUIRE_DEFINED([AX_PREPEND_FLAG])dnl @@ -90,31 +90,32 @@ AC_DEFUN([AX_FLAGS_WARN_ALL], [ AS_VAR_PUSHDEF([FOUND], [ac_save_[]_AC_LANG_ABBREV[]flags_warn_all_found])dnl AC_CACHE_CHECK([FLAGS for most reasonable warnings], VAR, [ + VAR="" FOUND="yes" dnl Cases are listed in the order found in ax_compiler_vendor.m4 AS_CASE("$ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor", [intel], [VAR="-w2"], [ibm], [VAR="-qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd"], - [pathscale], [VAR=""], + [pathscale], [], [clang], [VAR="-Wall"], [cray], [VAR="-h msglevel 2"], - [fujitsu], [VAR=""], - [sdcc], [VAR=""], + [fujitsu], [], + [sdcc], [], [sx], [VAR="-pvctl[,]fullmsg"], - [portland], [VAR=""], + [portland], [], [gnu], [VAR="-Wall"], [sun], [VAR="-v"], [hp], [VAR="+w1"], [dec], [VAR="-verbose -w0 -warnprotos"], - [borland], [VAR=""], - [comeau], [VAR=""], - [kai], [VAR=""], - [lcc], [VAR=""], + [borland], [], + [comeau], [], + [kai], [], + [lcc], [], [sgi], [VAR="-fullwarn"], - [microsoft], [VAR=""], - [metrowerks], [VAR=""], - [watcom], [VAR=""], - [tcc], [VAR=""], + [microsoft], [], + [metrowerks], [], + [watcom], [], + [tcc], [], [unknown], [ VAR="$2" FOUND="no" @@ -127,7 +128,7 @@ AC_DEFUN([AX_FLAGS_WARN_ALL], [ ) AS_IF([test "x$FOUND" = "xyes"], [dnl - m4_default($3, [AX_PREPEND_FLAG([$VAR], [FLAGS])]) + m4_default($3, [AS_IF([test "x$VAR" != "x"], [AX_PREPEND_FLAG([$VAR], [FLAGS])])]) ], [dnl m4_default($4, [m4_ifval($2, [AX_PREPEND_FLAG([$VAR], [FLAGS])], [true])]) ])dnl