From c9f0377ef4b346d44a8dc5d7f2838ac9fe3183fa Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Tue, 10 Sep 2013 16:08:09 +0200 Subject: [PATCH 2/7] configure: use same debug check code than Gabble https://bugs.freedesktop.org/show_bug.cgi?id=69216 --- configure.ac | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index cc96472..6cff19c 100644 --- a/configure.ac +++ b/configure.ac @@ -89,8 +89,14 @@ TP_COMPILER_WARNINGS([ERROR_CFLAGS], [test "x$enable_fatal_warnings" = xyes], unused-parameter]) AC_SUBST([ERROR_CFLAGS]) -AS_IF([test x$enable_debug = xyes], - [AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])]) +AC_ARG_ENABLE(debug, + AC_HELP_STRING([--disable-debug],[compile without debug code]), + enable_debug=$enableval, enable_debug=yes ) + +if test x$enable_debug = xyes; then + AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code]) +fi +AM_CONDITIONAL([ENABLE_DEBUG], [test "x$enable_debug" = xyes]) dnl Check for code generation tools XSLTPROC= -- 1.8.3.1