From 990c91f2a7b3eece87477e3dd9af8463993c7c03 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Sun, 8 Nov 2015 01:04:16 +0100 Subject: [PATCH] m4macros: make detectcflags.m4 more reliable GIMP_DETECT_CFLAGS: pass -Werror to the compiler when checking for flags, so the macro fails if passing a flag only warns but doesn't cause the compiler to fail. Before, the compiler would warn about the flag for each file compiled. --- m4macros/detectcflags.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m4macros/detectcflags.m4 b/m4macros/detectcflags.m4 index ad8a099873..ee33456a1d 100644 --- a/m4macros/detectcflags.m4 +++ b/m4macros/detectcflags.m4 @@ -7,7 +7,7 @@ AC_DEFUN([GIMP_DETECT_CFLAGS], for flag in $2; do if test -z "[$]$1"; then $1_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $flag" + CFLAGS="$CFLAGS -Werror $flag" AC_MSG_CHECKING([whether [$]CC understands [$]flag]) AC_TRY_COMPILE([], [], [$1_works=yes], [$1_works=no]) AC_MSG_RESULT([$]$1_works)