diff options
author | Colin Walters <walters@verbum.org> | 2012-01-29 16:01:56 -0500 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2012-02-09 16:54:04 -0600 |
commit | e4f51d19684c55abd1cdad839254e27d1cd095fa (patch) | |
tree | 21eec72e4a1b56769ae6af53b9bbb97cbcfd3f99 /m4 | |
parent | c721477d11d4fe144111d6d2eec8f93f2e9186c9 (diff) | |
download | NetworkManager-e4f51d19684c55abd1cdad839254e27d1cd095fa.tar.gz |
build: allow --set-more-warnings=no|yes|error
For the GNOME autobuilders, we want compiler warnings, but don't want
-Werror. For developer compatibility, the default value is "error".
https://bugzilla.gnome.org/show_bug.cgi?id=668974
Diffstat (limited to 'm4')
-rw-r--r-- | m4/compiler_warnings.m4 | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/m4/compiler_warnings.m4 b/m4/compiler_warnings.m4 index 575ea9a61e..eeacfae851 100644 --- a/m4/compiler_warnings.m4 +++ b/m4/compiler_warnings.m4 @@ -1,7 +1,7 @@ AC_DEFUN([NM_COMPILER_WARNINGS], [AC_ARG_ENABLE(more-warnings, - AS_HELP_STRING([--enable-more-warnings], [Maximum compiler warnings]), - set_more_warnings="$enableval",set_more_warnings=yes) + AS_HELP_STRING([--enable-more-warnings], [Possible values: no/yes/error]), + set_more_warnings="$enableval",set_more_warnings=error) AC_MSG_CHECKING(for more warnings) if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then AC_MSG_RESULT(yes) @@ -26,7 +26,9 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then unset SAVE_CFLAGS done unset option - CFLAGS="$CFLAGS -Werror" + if test "x$set_more_warnings" = xerror; then + CFLAGS="$CFLAGS -Werror" + fi else AC_MSG_RESULT(no) fi |