Index: configure.in =================================================================== --- configure.in (révision 66572) +++ configure.in (copie de travail) @@ -438,6 +438,16 @@ ]) AC_MSG_RESULT($with_cxx_main) +AC_MSG_CHECKING(for --with-memory-debugger) +AC_ARG_WITH(memory-debugger, + AC_HELP_STRING(--with-memory-debugger, use a memory debugger (eg. Valgrind or Purify)), +[ +AC_MSG_RESULT(yes) +# CFLAGS="${CFLAGS} -DPy_USING_MEMORY_DEBUGGER=1" +AC_DEFINE([Py_USING_MEMORY_DEBUGGER],[1],[Use a memory debugger (eg. Valgrind or Purify)]), +], +[AC_MSG_RESULT(no)]) + preset_cxx="$CXX" if test -z "$CXX" then Index: Misc/README.valgrind =================================================================== --- Misc/README.valgrind (révision 66572) +++ Misc/README.valgrind (copie de travail) @@ -7,8 +7,7 @@ you must use a suppressions file. One is supplied in Misc/valgrind-python.supp. Second, you must do one of the following: - * Uncomment Py_USING_MEMORY_DEBUGGER in Objects/obmalloc.c, - then rebuild Python + * rebuild Python using ./configure --with-memory-debugger * Uncomment the lines in Misc/valgrind-python.supp that suppress the warnings for PyObject_Free and PyObject_Realloc