summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-05-24 00:38:44 +0300
committerAndrei Karas <akaras@inbox.ru>2011-05-24 00:38:44 +0300
commitd2c42029b98c665725768b891aa877eb3267664f (patch)
treeb232b9a20e45ecb4e7ec2133d7806669054708a6 /configure.ac
parentfe39570810969993f51a0ff6045d0a5d4397a5e5 (diff)
downloadManaVerse-d2c42029b98c665725768b891aa877eb3267664f.tar.gz
ManaVerse-d2c42029b98c665725768b891aa877eb3267664f.tar.bz2
ManaVerse-d2c42029b98c665725768b891aa877eb3267664f.tar.xz
ManaVerse-d2c42029b98c665725768b891aa877eb3267664f.zip
Add simple memory leak detector.
Can be enabled by configure option -enable-memdebug=yes. Known issue: not all memory allocations hooked with it.
Diffstat (limited to 'configure.ac')
-rwxr-xr-xconfigure.ac11
1 files changed, 11 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index f79cecb1d..d76f687ca 100755
--- a/configure.ac
+++ b/configure.ac
@@ -156,6 +156,17 @@ esac],[portable_enabled=false])
AM_CONDITIONAL(ENABLE_PORTABLE, test x$portable_enabled = xtrue)
+# Enable debug
+AC_ARG_ENABLE(memdebug,
+[ --enable-memdebug Turn on memory debug mode],
+[case "${enableval}" in
+ yes) memdebug_enabled=true ;;
+ no) memdebug_enabled=false ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-memdebug) ;;
+esac],[memdebug_enabled=false])
+
+AM_CONDITIONAL(ENABLE_MEM_DEBUG, test x$memdebug_enabled = xtrue)
+
AC_CONFIG_FILES([
Makefile
src/Makefile