diff --git a/Makefile.am b/Makefile.am index 448332b2..d8d1a1ca 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,8 +3,10 @@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = subprojects/spice-common server docs tools +if ENABLE_TESTS check-valgrind: $(MAKE) -C server check-valgrind +endif pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = spice-server.pc diff --git a/configure.ac b/configure.ac index 18d6ddfd..c8bdfb0e 100644 --- a/configure.ac +++ b/configure.ac @@ -135,6 +135,13 @@ if test "x$have_gstreamer_0_10" = "xyes" || test "x$have_gstreamer_1_0" = "xyes" AC_SUBST(ORC_LIBS) fi +AC_ARG_ENABLE([tests], + AS_HELP_STRING([--enable-tests], + [Enable tests @<:@default=yes@:>@]), + [], + enable_tests="yes") +AM_CONDITIONAL(ENABLE_TESTS, test "x$enable_tests" = "xyes") + dnl Check for the presence of Valgrind and do the plumbing to allow dnl the running of "make check-valgrind". AX_VALGRIND_DFLT(memcheck, on) diff --git a/server/Makefile.am b/server/Makefile.am index 166ea894..3434e393 100644 --- a/server/Makefile.am +++ b/server/Makefile.am @@ -1,8 +1,12 @@ NULL = +SUBDIRS = + +if ENABLE_TESTS SUBDIRS = . tests check-valgrind: $(MAKE) -C tests check-valgrind +endif AM_CPPFLAGS = \ -DSPICE_SERVER_INTERNAL \