From b6550aed8bf40920ebd89c30dc36f3d9e617c1c1 Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Sun, 1 Jan 2012 23:19:40 +0100 Subject: [PATCH] configure: fix debug option NDEBUG definition We currently define NDEBUG only if ---debug is not specified at all. That is, --disable-debug currently has almost no effect. This fixes this bug and also corrects a wrong parenthesis. Signed-off-by: David Herrmann --- configure.ac | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index d8f28a8..dabb33e 100644 --- a/configure.ac +++ b/configure.ac @@ -74,11 +74,14 @@ AM_CONDITIONAL([USE_PANGO], [test x$force_pango = xyes]) AC_MSG_CHECKING([whether to build with debugging on]) AC_ARG_ENABLE([debug], - [AS_HELP_STRING([--enable-debug], [whether to build with debugging on)])], - [debug="$enableval"], - [debug=no; AC_DEFINE([NDEBUG], [1], [No Debug])]) + [AS_HELP_STRING([--enable-debug], [whether to build with debugging on])], + [debug="$enableval"], [debug=no]) AM_CONDITIONAL([DEBUG], [test x$debug = xyes]) AC_MSG_RESULT([$debug]) +if test ! x$debug = xyes ; then + AC_DEFINE([NDEBUG], [1], [No Debug]) +fi + AC_CONFIG_FILES([Makefile]) AC_OUTPUT