summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@openedhand.com>2008-06-13 11:22:35 +0100
committerEmmanuele Bassi <ebassi@openedhand.com>2008-06-13 11:22:35 +0100
commitbc5c7225535ef447743ac59ecdba8c237549a108 (patch)
treebf3fd588a8a27fb0c906baae18d7348fe18a6283
parent81c02ef3db6901655f8a7117e5e2675d37096daf (diff)
downloadjson-glib-bug-965.tar.gz
Conditionally compile the test suitebug-965
If the --disable-glibtest command line switch has been given to the configure script, the test suite should be disabled and not built. This commit disables recursion in the tests/ and json-glib/tests when the ENABLE_GLIB_TEST Makefile conditional has been set.
-rw-r--r--Makefile.am6
-rw-r--r--configure.ac3
-rw-r--r--json-glib/Makefile.am2
3 files changed, 10 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 868d1ad..d06623f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,10 @@
include $(top_srcdir)/Makefile.decl
-SUBDIRS = json-glib doc tests
+SUBDIRS = json-glib doc
+
+if ENABLE_GLIB_TEST
+SUBDIRS += tests
+endif
DIST_SUBDIRS = json-glib doc tests
diff --git a/configure.ac b/configure.ac
index 8fd6b0c..d2fe196 100644
--- a/configure.ac
+++ b/configure.ac
@@ -63,6 +63,8 @@ PKG_CHECK_MODULES(JSON, gobject-2.0 >= glib_req_version)
AC_SUBST(JSON_CFLAGS)
AC_SUBST(JSON_LIBS)
+AM_CONDITIONAL(ENABLE_GLIB_TEST, test "x$enable_glibtest" = "xyes")
+
dnl = Enable debug level ===================================================
m4_define([debug_default],
@@ -127,4 +129,5 @@ echo " Prefix: ${prefix}"
echo " Debug level: ${enable_debug}"
echo " Compiler flags: ${CPPFLAGS}"
echo " API reference: ${enable_gtk_doc}"
+echo " Enable test suite: ${enable_glibtest}"
echo ""
diff --git a/json-glib/Makefile.am b/json-glib/Makefile.am
index b57b78d..4060d66 100644
--- a/json-glib/Makefile.am
+++ b/json-glib/Makefile.am
@@ -1,6 +1,8 @@
include $(top_srcdir)/Makefile.decl
+if ENABLE_GLIB_TEST
SUBDIRS = . tests
+endif
DIST_SUBDIRS = tests