diff configure @ 4833:4dd2389173fc

merge
author Ben Wing <ben@xemacs.org>
date Sun, 10 Jan 2010 01:06:15 -0600
parents 9987da5935bd 5d120deb60ca
children b3ea9c582280
line wrap: on
line diff
--- a/configure	Sun Jan 10 00:49:30 2010 -0600
+++ b/configure	Sun Jan 10 01:06:15 2010 -0600
@@ -1017,6 +1017,8 @@
 with_quantify
 enable_purify
 with_purify
+enable_valgrind
+with_valgrind
 with_x
 '
       ac_precious_vars='build_alias
@@ -1974,6 +1976,7 @@
                           trigger bugs in some compilers.
   --with-quantify         Support performance debugging using Quantify.
   --with-purify           Support memory debugging using Purify.
+  --with-valgrind         Support memory debugging using Valgrind.
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -5335,6 +5338,22 @@
   withval="$with_purify"
 
 fi;
+# If --with-valgrind or --without-valgrind were given then copy the value to the
+# equivalent enable_valgrind variable.
+if test "${with_valgrind+set}" = set; then
+  enable_valgrind="$with_valgrind"
+fi;
+# If -enable-valgrind or --disable-valgrind were given then copy the value to the
+# equivalent with_valgrind variable.
+if test "${enable_valgrind+set}" = set; then
+  with_valgrind="$enable_valgrind"
+fi;
+# Check whether --with-valgrind or --without-valgrind was given.
+if test "${with_valgrind+set}" = set; then
+  enableval="$with_valgrind"
+  withval="$with_valgrind"
+
+fi;
 
 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
   test "$with_system_malloc" = "default" && with_system_malloc=yes
@@ -20635,6 +20654,8 @@
 
 test "$with_quantify"      = "yes" && $as_echo "#define QUANTIFY 1" >>confdefs.h
 
+test "$with_valgrind"      = "yes" && $as_echo "#define USE_VALGRIND 1" >>confdefs.h
+
 test "$with_pop"           = "yes" && $as_echo "#define MAIL_USE_POP 1" >>confdefs.h
 
 test "$with_kerberos"      = "yes" && $as_echo "#define KERBEROS 1" >>confdefs.h
@@ -20948,6 +20969,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
 echo ""