aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile.am16
-rw-r--r--configure.ac7
2 files changed, 23 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index ede4f6a0d..f39793efb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,6 +7,22 @@ EXTRA_DIST = $(doc_DATA) autogen.sh \
$(wildcard scripts/*.sh) scripts/mpd.spec \
.gitignore
+
+AM_CFLAGS = -I$(srcdir)/src $(GLIB_CFLAGS)
+AM_LDFLAGS = $(GLIB_LIBS)
+
+
+#
+# Test programs
+#
+
+if ENABLE_TEST
+
+noinst_PROGRAMS =
+
+endif
+
+
sparse-check test:
$(MAKE) -C src $@
diff --git a/configure.ac b/configure.ac
index 3b60f4b51..fbeb1beb8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1123,6 +1123,13 @@ if test "x$ENABLE_GPROF" = xyes; then
MPD_CFLAGS="$MPD_CFLAGS -pg"
fi
+AC_ARG_ENABLE(test,
+ AS_HELP_STRING([--enable-test],
+ [Build the test programs (default: disabled)]),,
+ enable_test=no)
+
+AM_CONDITIONAL(ENABLE_TEST, test "x$enable_test" = xyes)
+
dnl
dnl CFLAGS