about summary refs log tree commit diff
path: root/configure.ac
diff options
context:
space:
mode:
authorPeter Stephenson <p.w.stephenson@ntlworld.com>2014-06-24 18:50:50 +0100
committerPeter Stephenson <p.w.stephenson@ntlworld.com>2014-06-24 18:50:50 +0100
commit920db696cb53122bec0c8a83087852e7e8c018f0 (patch)
tree36e6b31f8eea75fe72dd9132342bdfcf94338ab3 /configure.ac
parent0853bcfdd6a90fb4e6a9b7428d9b2a4975af717e (diff)
downloadzsh-920db696cb53122bec0c8a83087852e7e8c018f0.tar.gz
zsh-920db696cb53122bec0c8a83087852e7e8c018f0.tar.xz
zsh-920db696cb53122bec0c8a83087852e7e8c018f0.zip
32789: --enable-zsh-valgrind allows analysis of heap allocation
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 11 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index a2a6b9eae..0f87a6c88 100644
--- a/configure.ac
+++ b/configure.ac
@@ -117,6 +117,17 @@ AC_HELP_STRING([--enable-zsh-heap-debug],
   AC_DEFINE(ZSH_HEAP_DEBUG)
 fi])
 
+dnl Do you want to allow Valgrind to debug heap allocation?
+ifdef([zsh-valgrind],[undefine([zsh-valgrind])])dnl
+AH_TEMPLATE([ZSH_VALGRIND],
+[Define to 1 if you want to add code for valgrind to debug heap memory.])
+AC_ARG_ENABLE(zsh-valgrind,
+AC_HELP_STRING([--enable-zsh-valgrind],
+[turn on support for valgrind debugging of heap memory]),
+[if test x$enableval = xyes;  then
+  AC_DEFINE(ZSH_VALGRIND)
+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