aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac3
-rw-r--r--tests/Makefile.am4
2 files changed, 6 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 94bba0c..608e80d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -121,7 +121,8 @@ PKG_CHECK_MODULES(DBUSMENUTESTS, json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION
gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION,
[have_tests=yes]
)
-PKG_CHECK_MODULES(DBUSMENUTESTSVALGRIND, valgrind)
+PKG_CHECK_MODULES(DBUSMENUTESTSVALGRIND, valgrind, have_valgrind=yes, have_valgrind=no)
+AM_CONDITIONAL([HAVE_VALGRIND], [test "x$have_valgrind" = "xyes"])
])
AC_SUBST(DBUSMENUTESTS_CFLAGS)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index df87dc8..c375562 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -16,10 +16,12 @@ TESTS = \
test-glib-submenu
if WANT_DBUSMENUDUMPER
+if HAVE_VALGRIND
TESTS += \
test-json \
test-json-instruction
endif
+endif
if WANT_LIBDBUSMENUGTK
TESTS += \
@@ -59,10 +61,12 @@ check_PROGRAMS = \
test-glib-simple-items
if WANT_DBUSMENUDUMPER
+if HAVE_VALGRIND
check_PROGRAMS += \
test-json-client \
test-json-server
endif
+endif
if WANT_LIBDBUSMENUGTK
check_PROGRAMS += \