From 920db696cb53122bec0c8a83087852e7e8c018f0 Mon Sep 17 00:00:00 2001
From: Peter Stephenson
Date: Tue, 24 Jun 2014 18:50:50 +0100
Subject: 32789: --enable-zsh-valgrind allows analysis of heap allocation
---
configure.ac | 11 +++++++++++
1 file changed, 11 insertions(+)
(limited to 'configure.ac')
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
--
cgit 1.4.1