Commit 990c91f2 authored by Michael Natterer's avatar Michael Natterer 😴

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.
parent 3f2efc57
......@@ -7,7 +7,7 @@ AC_DEFUN([GIMP_DETECT_CFLAGS],
for flag in $2; do
if test -z "[$]$1"; then
CFLAGS="$CFLAGS -Werror $flag"
AC_MSG_CHECKING([whether [$]CC understands [$]flag])
AC_TRY_COMPILE([], [], [$1_works=yes], [$1_works=no])
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment