Add support for inserting (a subset of) Valgrind client requests
[platform/upstream/dbus.git] / configure.ac
index 2b9e740..7bd4ddf 100644 (file)
@@ -1140,7 +1140,7 @@ if test x$enable_systemd = xno ; then
     have_systemd=no;
 else
     PKG_CHECK_MODULES(SYSTEMD,
-        [ libsystemd-login libsystemd-daemon ],
+        [libsystemd-login >= 32, libsystemd-daemon >= 32],
         have_systemd=yes,
         have_systemd=no)
     AC_SUBST(SYSTEMD_CFLAGS)
@@ -1217,6 +1217,17 @@ fi
 
 AC_SUBST([NETWORK_libs])
 
+AC_ARG_WITH([valgrind],
+  [AS_HELP_STRING([--with-valgrind],
+     [Add instrumentation to help valgrind to understand our allocator])],
+  [],
+  [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])
+fi
+
 #### Set up final flags
 LIBDBUS_LIBS="$THREAD_LIBS $NETWORK_libs"
 AC_SUBST([LIBDBUS_LIBS])