diff options
author | Allan McRae <allan@archlinux.org> | 2013-02-10 02:55:04 +0100 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2013-02-13 02:50:33 +0100 |
commit | 05b0d7e799416b48bb8b40ea199896e2b988698c (patch) | |
tree | ca996c964aacb294bc34d50264acdd74bfdc74fd /m4/acinclude.m4 | |
parent | 42b492b2fd04ed33cfe95a0a3883d78e82ddec90 (diff) | |
download | pacman-05b0d7e799416b48bb8b40ea199896e2b988698c.tar.gz pacman-05b0d7e799416b48bb8b40ea199896e2b988698c.tar.xz |
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 <allan@archlinux.org>
Diffstat (limited to 'm4/acinclude.m4')
-rw-r--r-- | m4/acinclude.m4 | 4 |
1 files changed, 4 insertions, 0 deletions
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])], |