aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorFrederic Culot <calcurse@culot.org>2008-12-08 20:03:15 +0000
committerFrederic Culot <calcurse@culot.org>2008-12-08 20:03:15 +0000
commit9981581a503d9d327b59301bdade7665f16ec04b (patch)
treeebd1868d3fab3b9f5969d10e13a4df12ab8656c6 /configure.ac
parent722441e05414f6436e7a5b617456e04f3cdbae0f (diff)
downloadcalcurse-9981581a503d9d327b59301bdade7665f16ec04b.tar.gz
calcurse-9981581a503d9d327b59301bdade7665f16ec04b.zip
--enable-debug configuration option added
Diffstat (limited to 'configure.ac')
-rwxr-xr-xconfigure.ac17
1 files changed, 16 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 8fadb8a..89f06f7 100755
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-# $calcurse: configure.ac,v 1.23 2008/12/08 19:40:23 culot Exp $
+# $calcurse: configure.ac,v 1.24 2008/12/08 20:03:15 culot Exp $
#-------------------------------------------------------------------------------
# Init
@@ -57,6 +57,21 @@ AC_CHECK_HEADERS([math.h], [
# Compilation options
#-------------------------------------------------------------------------------
CFLAGS+="-Wall -g"
+
+AC_ARG_ENABLE(debug,
+ AS_HELP_STRING([--enable-debug], [set CFLAGS for debug]),
+ debug=$enableval)
+if test "$debug" != "yes"; then
+ debug=no
+ AC_DEFINE(DBG_DISABLED, 1, [Define to 1 if you do not want debug.])
+ CFLAGS="$CFLAGS -O2 -Wall"
+else
+ AC_DEFINE(DBG_ENABLED, 1, [Define to 1 if you want debug.])
+ CFLAGS="$CFLAGS -g -ggdb -Wall"
+fi
+AC_MSG_CHECKING([if debug should be used])
+AC_MSG_RESULT($debug)
+AM_CONDITIONAL(DBG_ENABLED, test x$debug = xyes)
#-------------------------------------------------------------------------------
# Create Makefiles
#-------------------------------------------------------------------------------