diff configure.ac @ 4803:5d120deb60ca

Enable rudimentary support for valgrind, including functions that tell valgrind to do a leak check at runtime. See xemacs-patches message with ID <870180fe1001060942k2b06ef1bn2631c5f226b5e6b2@mail.gmail.com>.
author Jerry James <james@xemacs.org>
date Wed, 06 Jan 2010 10:44:06 -0700
parents bc4f2511bbea
children 4dd2389173fc
line wrap: on
line diff
--- a/configure.ac	Wed Jan 06 10:01:14 2010 -0700
+++ b/configure.ac	Wed Jan 06 10:44:06 2010 -0700
@@ -1014,6 +1014,9 @@
 XE_MERGED_ARG([purify],
 	AS_HELP_STRING([--with-purify],[Support memory debugging using Purify.]),
 	[], [])
+XE_MERGED_ARG([valgrind],
+	AS_HELP_STRING([--with-valgrind],[Support memory debugging using Valgrind.]),
+	[], [])
 dnl -------------------------------------------------------------------------
 dnl Final command line argument checks.
 
@@ -5490,6 +5493,7 @@
 test "$enable_quick_build" = "yes" && AC_DEFINE(QUICK_BUILD)
 test "$with_purify"        = "yes" && AC_DEFINE(PURIFY)
 test "$with_quantify"      = "yes" && AC_DEFINE(QUANTIFY)
+test "$with_valgrind"      = "yes" && AC_DEFINE(USE_VALGRIND)
 test "$with_pop"           = "yes" && AC_DEFINE(MAIL_USE_POP)
 test "$with_kerberos"      = "yes" && AC_DEFINE(KERBEROS)
 test "$with_hesiod"        = "yes" && AC_DEFINE(HESIOD)
@@ -5805,6 +5809,7 @@
   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
   echo "  WARNING: ---------------------------------------------------------"
 fi
+test "$with_valgrind" = yes && echo "  Compiling in support for memory debugging with Valgrind."
 echo ""
 ) | tee -a Installation
 dnl echo "The above configure report is appended to \"Installation\" file."