diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2015-05-17 21:16:29 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2015-05-17 21:46:57 +0300 |
commit | ccad54b9fd4a6a695817781c973f79f89962a8e9 (patch) | |
tree | a5e8ae300a2e951e372eaafcc8fe5ca8513caa48 | |
parent | 718f148737df5f02e543f63c03c7f89277148d03 (diff) | |
download | libatomic_ops-ccad54b9fd4a6a695817781c973f79f89962a8e9.tar.gz |
New configure option (--enable-werror) to treat warnings as compiler errors
* configure.ac (werror): Test --enable-werror option to add -Werror
to CFLAGS.
-rw-r--r-- | configure.ac | 6 |
1 files changed, 6 insertions, 0 deletions
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*) |