summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2012-07-20 01:53:16 -0400
committerColin Walters <walters@verbum.org>2012-07-20 01:53:16 -0400
commit0e7f255f16c04dc737b45fe1fb68893bdde643b1 (patch)
treeaa169072d253573b05a7bcfabe6fa08f011cec05
parent99582da7427587a389b47375df66076d59fc1d68 (diff)
downloadgjs-0e7f255f16c04dc737b45fe1fb68893bdde643b1.tar.gz
build: Add --disable-tests
The regress test depends on cairo-gobject which isn't on RHEL6.
-rw-r--r--Makefile-test.am6
-rw-r--r--configure.ac3
2 files changed, 9 insertions, 0 deletions
diff --git a/Makefile-test.am b/Makefile-test.am
index ff7e7e99..2bac21a4 100644
--- a/Makefile-test.am
+++ b/Makefile-test.am
@@ -2,7 +2,9 @@ RUN_WITH_DBUS = ${top_srcdir}/test/run-with-dbus --session --system
GTESTER = ${TESTS_ENVIRONMENT} ${RUN_WITH_DBUS} gtester
########################################################################
+if ENABLE_TESTS
TEST_PROGS += gjs-tests
+endif
gjs_tests_CFLAGS = \
-include $(top_srcdir)/test/test.h \
@@ -37,7 +39,9 @@ gjstest.h.stamp : scripts/make-tests $(gjstest_files_with_tests)
gjstest.h gjstest.c : gjstest.h.stamp
@true
+if ENABLE_TESTS
TEST_PROGS += gjs-unit
+endif
gjs_unit_CPPFLAGS = \
$(AM_CPPFLAGS) \
@@ -64,9 +68,11 @@ EXTRA_DIST += \
scripts/make-tests
# noinst_ always builds a static library
+if ENABLE_TESTS
testlib_LTLIBRARIES = libregress.la libgimarshallingtests.la
testlibdir = $(prefix)/unused
install-testlibLTLIBRARIES: # prevent it from being installed
+endif
nodist_libregress_la_SOURCES = $(GI_DATADIR)/tests/regress.c $(GI_DATADIR)/tests/regress.h
libregress_la_CFLAGS = $(GJS_CFLAGS) $(GJS_CAIRO_CFLAGS)
diff --git a/configure.ac b/configure.ac
index 05bf6bb2..8e7f6fa2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -139,6 +139,9 @@ fi
PKG_CHECK_MODULES([GJS_DBUS], [$gjs_dbus_packages])
PKG_CHECK_MODULES([GJS_GDBUS], [$gjs_gdbus_packages])
+AC_ARG_ENABLE(tests,[ --disable-tests disable test libraries ], enable_tests=$enableval,enable_tests=yes)
+AM_CONDITIONAL(ENABLE_TESTS, test x$enable_tests = xyes)
+
saved_CFLAGS=$CFLAGS
CFLAGS=$GJS_DBUS_CFLAGS
saved_LIBS=$LIBS