From 1c0980239d566305abb3ff56f54b8bacad8f79e7 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 12 Oct 2012 13:53:25 +0100 Subject: [PATCH] Add support for configuring --with-valgrind=auto This is the configuration I'd like to use for the "debug build" of dbus on Debian - if we use --with-valgrind=yes, we have to hard-code knowledge of which architectures do and don't have Valgrind in two places instead of just one. --- configure.ac | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure.ac b/configure.ac index b0f2ec2..17f0c72 100644 --- a/configure.ac +++ b/configure.ac @@ -1246,6 +1246,10 @@ AC_ARG_WITH([valgrind], [], [with_valgrind=no]) +AS_IF([test "x$with_valgrind" = xauto], + [PKG_CHECK_EXISTS([valgrind >= 3.6], + [with_valgrind=yes], [with_valgrind=no])]) + if test x$with_valgrind != xno; then PKG_CHECK_MODULES([VALGRIND], [valgrind >= 3.6]) AC_DEFINE([WITH_VALGRIND], [1], [Define to add Valgrind instrumentation]) -- 1.7.10.4