aclocal.m4: use -Werror in WINE_TRY_CFLAGS

Austin English austinenglish at gmail.com
Tue Apr 12 16:25:45 CDT 2011


This allows properly detecting CFLAGS on clang, which only warns for
unrecognized options by default. Tested against Clang 3.0 (trunk)/gcc
4.4.5/gcc 4.70 (svn)

For http://bugs.winehq.org/show_bug.cgi?id=26751

-- 
-Austin
-------------- next part --------------
diff --git a/aclocal.m4 b/aclocal.m4
index 234a6b8..7641c4a 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -74,7 +74,7 @@ AC_DEFUN([WINE_TRY_CFLAGS],
 [AS_VAR_PUSHDEF([ac_var], ac_cv_cflags_[[$1]])dnl
 AC_CACHE_CHECK([whether the compiler supports $1], ac_var,
 [ac_wine_try_cflags_saved=$CFLAGS
-CFLAGS="$CFLAGS $1"
+CFLAGS="$CFLAGS -Werror $1"
 AC_LINK_IFELSE(AC_LANG_SOURCE([[int main(int argc, char **argv) { return 0; }]]),
                [AS_VAR_SET(ac_var,yes)], [AS_VAR_SET(ac_var,no)])
 CFLAGS=$ac_wine_try_cflags_saved])


More information about the wine-patches mailing list