From: Max Kellermann Date: Thu, 25 Dec 2008 02:02:30 +0000 (+0100) Subject: configure.ac: added --enable-werror, rewrote --enable-debug X-Git-Tag: release-0.13~52 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=edf2468da43f1da28f48edc7aa0ff3a6e2e61b0c;p=ncmpc.git configure.ac: added --enable-werror, rewrote --enable-debug "--enable-werror" adds "-Werror" to CFLAGS. --- diff --git a/configure.ac b/configure.ac index b7f71b5..0a1d68d 100644 --- a/configure.ac +++ b/configure.ac @@ -365,17 +365,24 @@ dnl 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