From 9fb79c2758fca2f01b3f691be316b986fef1e7fd Mon Sep 17 00:00:00 2001 From: Martin Stjernholm <mast@lysator.liu.se> Date: Mon, 27 Sep 2004 23:47:35 +0200 Subject: [PATCH] Note that --with-valgrind implies --with-cleanup-at-exit, and made that possible to override with --without-cleanup-at-exit. Rev: src/configure.in:1.843 Rev: src/global.h:1.105 --- src/configure.in | 8 ++++++-- src/global.h | 5 ++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/configure.in b/src/configure.in index d043adf619..3bcdd89ce7 100644 --- a/src/configure.in +++ b/src/configure.in @@ -1,4 +1,4 @@ -AC_REVISION("$Id: configure.in,v 1.842 2004/09/26 15:49:02 marcus Exp $") +AC_REVISION("$Id: configure.in,v 1.843 2004/09/27 21:47:34 mast Exp $") AC_INIT(interpret.c) AC_CONFIG_HEADER(machine.h) @@ -1429,7 +1429,7 @@ AC_ARG_WITH(mysql, MY_DESCR([--without-mysql], [disable support for the Mysql database]), [],[with_mysql=yes]) AC_ARG_WITH(valgrind, MY_DESCR([--with-valgrind=path], - [Support for running with valgrind]), [ + [Support for running with valgrind. Implies --with-cleanup-on-exit.]), [ if test "x$with_valgrind" = "xyes"; then AC_PATH_PROG(with_valgrind, valgrind, no) if test "x$with_valgrind" = "xno"; then @@ -1574,6 +1574,10 @@ else VALGRINDARGS="-q --tool=memcheck" AC_DEFINE(USE_VALGRIND) + if test "x$with_cleanup_on_exit" = "x"; then + AC_DEFINE(DO_PIKE_CLEANUP) + fi + if test "x$with_copt" != "xno"; then PIKE_MSG_WARN([--without-copt is advisable when using valgrind!]) fi diff --git a/src/global.h b/src/global.h index e19eaaae26..7ee4e3ef80 100644 --- a/src/global.h +++ b/src/global.h @@ -2,7 +2,7 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: global.h,v 1.104 2004/09/26 15:14:44 marcus Exp $ +|| $Id: global.h,v 1.105 2004/09/27 21:47:35 mast Exp $ */ #ifndef GLOBAL_H @@ -436,8 +436,7 @@ typedef struct p_wchar_p #endif #ifndef DO_PIKE_CLEANUP -#if defined(PURIFY) || defined(__CHECKER__) || \ - defined(DEBUG_MALLOC) || defined(USE_VALGRIND) +#if defined(PURIFY) || defined(__CHECKER__) || defined(DEBUG_MALLOC) #define DO_PIKE_CLEANUP #endif #endif -- GitLab