[goobox] added the --enable-debug option to configure



commit 3f6cf20f38cd0a64b4b60c962181b39479afaba1
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sat Jun 2 21:16:56 2012 +0200

    added the --enable-debug option to configure

 configure.ac |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 7c80a82..e7316f3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,6 +44,23 @@ dnl ===========================================================================
 AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
 AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)
 
+dnl ===========================================================================
+
+AC_ARG_ENABLE(debug,
+              AS_HELP_STRING([--enable-debug], [enable compilation of debugging messages]),
+              case "${enableval}" in
+              yes) ENABLE_DEBUG=yes ;;
+              no) ENABLE_DEBUG=no ;;
+              *) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
+              esac],
+              [ENABLE_DEBUG=no])
+if test x$ENABLE_DEBUG = xyes; then
+        AC_DEFINE(DEBUG, 1, [enable compilation of debugging messages])
+        CFLAGS="$CFLAGS -g -O0 -DDEBUG"
+fi
+
+dnl ===========================================================================
+
 AC_ARG_ENABLE(run_in_place,
 	      AS_HELP_STRING([--enable-run-in-place],[load ui data and extensions from the source tree]),
 	      [case "${enableval}" in



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]