[gjs] build: Add --disable-tests



commit 0e7f255f16c04dc737b45fe1fb68893bdde643b1
Author: Colin Walters <walters verbum org>
Date:   Fri Jul 20 01:53:16 2012 -0400

    build: Add --disable-tests
    
    The regress test depends on cairo-gobject which isn't on RHEL6.

 Makefile-test.am |    6 ++++++
 configure.ac     |    3 +++
 2 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/Makefile-test.am b/Makefile-test.am
index ff7e7e9..2bac21a 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 05bf6bb..8e7f6fa 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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]