From 05b0d7e799416b48bb8b40ea199896e2b988698c Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Sun, 10 Feb 2013 11:55:04 +1000 Subject: Fix --enable-warningflags gcc gives an error on an unknown warning flag, but clang just gives a warning. Upgrade the warning in clang to an error by activating -Werror=unknown-warning-option if available. Signed-off-by: Allan McRae --- m4/acinclude.m4 | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'm4') diff --git a/m4/acinclude.m4 b/m4/acinclude.m4 index e601f0ed..294507e2 100644 --- a/m4/acinclude.m4 +++ b/m4/acinclude.m4 @@ -114,6 +114,10 @@ AC_DEFUN([CFLAGS_ADD], [AS_VAR_PUSHDEF([my_cflags], [cflags_cv_warn_$1])dnl AC_CACHE_CHECK([whether compiler handles $1], [my_cflags], [ save_CFLAGS="$CFLAGS" + CFLAGS="${CFLAGS} -Werror=unknown-warning-option" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], + [], + [CFLAGS="$save_CFLAGS"]) CFLAGS="${CFLAGS} $1" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], [AS_VAR_SET([my_cflags], [yes])], -- cgit v1.2.3-70-g09d2