build: set in NDEBUG instead of DEBUG in configure

Signed-off-by: Ran Benita <ran234@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
Ran Benita 2011-12-12 22:37:07 +02:00 committed by David Herrmann
parent dfd880881e
commit 7ed09101f0
2 changed files with 5 additions and 4 deletions

View File

@ -47,10 +47,9 @@ AC_SUBST(PANGO_LIBS)
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"; AC_DEFINE([DEBUG], [0], [Debug])],
[debug=no])
[AS_HELP_STRING([--enable-debug], [whether to build with debugging on)])],
[debug="$enableval"],
[debug=no; AC_DEFINE([NDEBUG], [1], [No Debug])])
AM_CONDITIONAL([DEBUG], [test x$debug = xyes])
AC_MSG_RESULT([$debug])

View File

@ -38,6 +38,8 @@
#include <stdarg.h>
#include <stdlib.h>
#include "config.h"
/* LOG_EMERG and LOG_ALERT do not make sense for this application */
#define LOG_CRIT "<2>" /* error that cannot be handled correctly */
#define LOG_ERR "<3>" /* error detected */