summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2c12b89)
raw | patch | inline | side by side (parent: 2c12b89)
author | Max Kellermann <max@duempel.org> | |
Thu, 25 Dec 2008 02:02:30 +0000 (03:02 +0100) | ||
committer | Max Kellermann <max@duempel.org> | |
Thu, 25 Dec 2008 02:02:30 +0000 (03:02 +0100) |
"--enable-werror" adds "-Werror" to CFLAGS.
configure.ac | patch | blob | history |
diff --git a/configure.ac b/configure.ac
index b7f71b5de79699ac567a3c3ac97df19c182a701d..0a1d68d87bfbce4fc2883226ea48e3f83159c068 100644 (file)
--- a/configure.ac
+++ b/configure.ac
dnl build options
dnl
-AC_MSG_CHECKING([whether to build with debug support])
-AC_ARG_ENABLE([debug],
- AC_HELP_STRING([--enable-debug],
- [Enable debugging @<:@default=no@:>@]),
- [enable_debug="$enableval"],
- [enable_debug=no])
-AC_MSG_RESULT([$enable_debug])
-if test "x$enable_debug" = "xyes" ; then
- CFLAGS="$CFLAGS -g"
-else
- CFLAGS="$CFLAGS -DNDEBUG"
+AC_ARG_ENABLE(werror,
+ AS_HELP_STRING([--enable-werror],
+ [Treat warnings as errors (default: disabled)]),
+ ENABLE_WERROR=$enableval,
+ ENABLE_WERROR=no)
+
+if test "x$ENABLE_WERROR" = xyes; then
+ AM_CFLAGS="$AM_CFLAGS -Werror"
+fi
+
+AC_ARG_ENABLE(debug,
+ AS_HELP_STRING([--enable-debug],
+ [Enable debugging (default: disabled)]),
+ ENABLE_DEBUG=$enableval,
+ ENABLE_DEBUG=no)
+
+if test "x$ENABLE_DEBUG" = xno; then
+ AM_CFLAGS="$AM_CFLAGS -DNDEBUG"
fi