Mercurial > hg > xemacs-beta
diff configure @ 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 Wed Jan 06 10:01:14 2010 -0700 +++ b/configure Wed Jan 06 10:44:06 2010 -0700 @@ -1062,6 +1062,8 @@ with_quantify enable_purify with_purify +enable_valgrind +with_valgrind with_x ' ac_precious_vars='build_alias @@ -2030,6 +2032,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] @@ -4753,6 +4756,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 @@ -40927,6 +40946,10 @@ #define QUANTIFY 1 _ACEOF +test "$with_valgrind" = "yes" && cat >>confdefs.h <<\_ACEOF +#define USE_VALGRIND 1 +_ACEOF + test "$with_pop" = "yes" && cat >>confdefs.h <<\_ACEOF #define MAIL_USE_POP 1 _ACEOF @@ -41254,6 +41277,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 ""