Commit 1f6ae2a6 authored by W. Michael Petullo's avatar W. Michael Petullo

Make building tests optional

Signed-off-by: W. Michael Petullo's avatarW. Michael Petullo <mike@flyn.org>
parent 7e9d2bf7
......@@ -45,6 +45,14 @@ GOBJECT_INTROSPECTION_CHECK([1.30.0])
GTK_DOC_CHECK(1.0)
AC_CONFIG_MACRO_DIR(m4)
dnl Test if --disable-tests given
AC_ARG_ENABLE(tests, [AC_HELP_STRING([--disable-tests],[do not build tests])], tests=$enableval, tests=yes)
if test x$tests = xyes; then
AC_DEFINE(WITH_TESTS,1,[Defined when tests are to be built])
AM_CONDITIONAL(WITH_TESTS, true)
else
AM_CONDITIONAL(WITH_TESTS, false)
fi
dnl Test if --enable-debug given
AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug],[enable debugging mode])])
......
if WITH_TESTS
noinst_PROGRAMS = test-dmap-client test-dmap-server
if HAVE_GEE
......@@ -13,6 +14,7 @@ noinst_PROGRAMS += unit-test
LIBS += $(CHECK_LIBS)
endif
endif
test_dmap_client_SOURCES = \
test-dmap-db.c \
......@@ -53,7 +55,9 @@ test_dmap_server_LDADD = \
$(MDNS_LIBS)
if HAVE_VALAC
if WITH_TESTS
BUILT_SOURCES = dacplisten.stamp dpapview.stamp dmapcopy.stamp dmapserve.stamp
endif
dacplisten.stamp: $(dacplisten_VALASOURCES)
$(VALAC) --vapidir=../vala --pkg gee-0.8 --pkg gstreamer-1.0 --pkg libdmapsharing-3.0 --pkg libsoup-2.4 --pkg glib-2.0 --pkg avahi-gobject $^ -C
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment