aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeni Golov <evgeni@debian.org>2012-06-12 08:55:51 +0200
committerEvgeni Golov <evgeni@debian.org>2012-06-12 08:55:51 +0200
commit4fc9c62ab2356caeaac7fc7dd968bdf0cb838d46 (patch)
tree64dd63272a08b81432e4f28f7f2ddd33da7af560
parent582b25fa3feb01f28196c6c26c898f859afeb808 (diff)
downloadlibdbusmenu-4fc9c62ab2356caeaac7fc7dd968bdf0cb838d46.tar.gz
libdbusmenu-4fc9c62ab2356caeaac7fc7dd968bdf0cb838d46.tar.bz2
libdbusmenu-4fc9c62ab2356caeaac7fc7dd968bdf0cb838d46.zip
make pkg-config check not fail if valgrind was not found
this allows to build and run non-valgrind checks on arches where valgrind is not available
-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 += \