diff options
author | Frederic Culot <calcurse@culot.org> | 2008-12-28 13:13:58 +0000 |
---|---|---|
committer | Frederic Culot <calcurse@culot.org> | 2008-12-28 13:13:58 +0000 |
commit | 5352496984d550bd441b12a082d5a382c168cbe2 (patch) | |
tree | 8a61b0785ba0d2f9edde566bef372360244949e3 /configure.ac | |
parent | a63c74892085e6bd5ea8b88712f44d1567ce7ed3 (diff) | |
download | calcurse-5352496984d550bd441b12a082d5a382c168cbe2.zip |
Added wrappers around libc's memory management functions, to easily debug memory usage
Diffstat (limited to 'configure.ac')
-rwxr-xr-x | configure.ac | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 05ccb4a..678b25e 100755 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -# $calcurse: configure.ac,v 1.27 2008/12/27 10:27:53 culot Exp $ +# $calcurse: configure.ac,v 1.28 2008/12/28 13:13:59 culot Exp $ #------------------------------------------------------------------------------- # Init @@ -57,6 +57,22 @@ AC_CHECK_HEADERS([math.h], [ # Compilation options #------------------------------------------------------------------------------- CFLAGS="$CFLAGS -Wall" + +AC_ARG_ENABLE(memory_debug, + AS_HELP_STRING([--enable-memory-debug], + [use memory debug functions]), + memdebug=$enableval) +if test "$memdebug" != "yes"; then + memdebug=no + AC_DEFINE(CALCURSE_MEMORY_DEBUG_DISABLED, 1, + [Define to 1 if you do not want memory debug.]) +else + AC_DEFINE(CALCURSE_MEMORY_DEBUG, 1, + [Define to 1 if you want memory debug.]) +fi +AC_MSG_CHECKING([if memory debug should be used]) +AC_MSG_RESULT($memdebug) +AM_CONDITIONAL(CALCURSE_MEMORY_DEBUG, test x$memdebug = xyes) #------------------------------------------------------------------------------- # Create Makefiles #------------------------------------------------------------------------------- |