From: Ivan Maidanski Date: Sun, 17 May 2015 18:16:29 +0000 (+0300) Subject: New configure option (--enable-werror) to treat warnings as compiler errors X-Git-Tag: v7.6.0~240 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ccad54b9fd4a6a695817781c973f79f89962a8e9;p=libatomic_ops New configure option (--enable-werror) to treat warnings as compiler errors * configure.ac (werror): Test --enable-werror option to add -Werror to CFLAGS. --- diff --git a/configure.ac b/configure.ac index 0908ef3..e11b9c7 100644 --- a/configure.ac +++ b/configure.ac @@ -56,6 +56,12 @@ if test "$GCC" = yes; then AC_MSG_RESULT($ac_cv_cc_wextra) AS_IF([test "$ac_cv_cc_wextra" = yes], [WEXTRA="-Wextra"], [WEXTRA="-W"]) CFLAGS="-Wall $WEXTRA $CFLAGS" + + AC_ARG_ENABLE(werror, [AC_HELP_STRING([--enable-werror], + [Pass -Werror to the C compiler])]) + if test "$enable_werror" = yes; then + CFLAGS="-Werror $CFLAGS" + fi else case "$host" in *-*-hpux*)