[sodipodi] Add --enable-debug configure switch



commit a8dac25a5e81ecf0ef987961566d6fe2977d441b
Author: Hans Breuer <hans breuer org>
Date:   Sat Apr 18 17:40:14 2009 +0200

    Add --enable-debug configure switch
---
 configure.in |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/configure.in b/configure.in
index 45a2514..01d895a 100644
--- a/configure.in
+++ b/configure.in
@@ -321,6 +321,27 @@ fi
 
 AM_CONDITIONAL(USE_MMX, test x$use_mmx_asm = xyes)
 
+dnl
+dnl Debugging
+dnl
+AC_ARG_ENABLE(debug, 
+[  --enable-debug=[no/minimum/yes] turn on debugging [default=minimum]],
+  ,
+  enable_debug=minimum)
+
+if test "x$enable_debug" = "xyes"; then
+  DEBUG_FLAGS="-DG_ENABLE_DEBUG"
+else
+  if test "x$enable_debug" = "xno"; then
+    DEBUG_FLAGS=""
+  else
+    DEBUG_FLAGS=""
+  fi
+fi
+if test -n "$DEBUG_FLAGS"; then
+  CFLAGS="$DEBUG_FLAGS $CFLAGS"
+fi
+
 dnl KDE dialogs and printing support
 AC_ARG_WITH(kde, AC_HELP_STRING([--with-kde], [Compile with kde support (experimental)]), [kde=$withval], [kde=no])
 AM_CONDITIONAL(USE_KDE, test "x$kde" = "xyes")



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