about summary refs log tree commit diff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 12 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 116de2e4f..1ce815ca5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -105,6 +105,18 @@ AC_HELP_STRING([--enable-zsh-secure-free], [turn on error checking for free()]),
   AC_DEFINE(ZSH_SECURE_FREE)
 fi])
 
+dnl Do you want to debug zsh heap allocation?
+dnl Does not depend on zsh-mem.
+ifdef([zsh-heap-debug],[undefine([zsh-heap-debug])])dnl
+AH_TEMPLATE([ZSH_HEAP_DEBUG],
+[Define to 1 if you want to turn on error checking for heap allocation.])
+AC_ARG_ENABLE(zsh-heap-debug,
+AC_HELP_STRING([--enable-zsh-heap-debug],
+[turn on error checking for heap allocation]),
+[if test x$enableval = xyes; then
+  AC_DEFINE(ZSH_HEAP_DEBUG)
+fi])
+
 dnl Do you want debugging information on internal hash tables.
 dnl This turns on the `hashinfo' builtin command.
 ifdef([zsh-hash-debug],[undefine([zsh-hash-debug])])dnl