build: Make building the test binaries optional under Autoconf

Following similar change for Meson.
Allow to save some time packaging and some dependencies.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
Frediano Ziglio 2020-03-18 01:54:41 +00:00
parent 7a2b915551
commit 38c7964d53
3 changed files with 13 additions and 0 deletions

View File

@ -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

View File

@ -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)

View File

@ -1,8 +1,12 @@
NULL =
SUBDIRS =
if ENABLE_TESTS
SUBDIRS = . tests
check-valgrind:
$(MAKE) -C tests check-valgrind
endif
AM_CPPFLAGS = \
-DSPICE_SERVER_INTERNAL \