summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2012-10-12 13:53:25 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2013-10-08 11:06:19 +0100
commit57dc720b9f25dec999fcc53da982114098cefae9 (patch)
treee0bb95243a66f82142e9e5a229b171aa60b52955 /configure.ac
parentf81cd4a18b9247760341c711a401947bad04698d (diff)
downloaddbus-57dc720b9f25dec999fcc53da982114098cefae9.tar.gz
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. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=56925 Reviewed-by: Chengwei Yang <chengwei.yang@intel.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac4
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index f4c88262..174308fb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1225,6 +1225,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])