diff options
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | plugins/Makefile.am | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 816d5c03..a5f8d827 100644 --- a/configure.ac +++ b/configure.ac @@ -133,6 +133,10 @@ dnl----------------------------------------------------------------------------- dnl Testing support dnl +dnl DBus testing support only with GIO 2.34 +PKG_CHECK_MODULES(DBUS_TEST_SUPPORT, [gio-2.0 >= 2.34], [have_dbus_test_support=yes], [have_dbus_test_support=no]) +AM_CONDITIONAL(BUILD_DBUS_TEST_SUPPORT, test "x$have_dbus_test_support" = "xyes") + dnl Code coverage (disabled by default) AX_CODE_COVERAGE diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 1e30b1a3..b6eff438 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -50,6 +50,8 @@ noinst_LTLIBRARIES = # Common service test support +if BUILD_DBUS_TEST_SUPPORT + noinst_LTLIBRARIES += libmm-test-common.la libmm_test_common_la_SOURCES = \ @@ -87,6 +89,7 @@ TEST_COMMON_LIBADD_FLAGS = \ $(builddir)/libmm-test-common.la \ $(top_builddir)/libmm-glib/libmm-glib.la +endif ######################################## @@ -158,12 +161,16 @@ libmm_plugin_generic_la_SOURCES = \ libmm_plugin_generic_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) libmm_plugin_generic_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) +if BUILD_DBUS_TEST_SUPPORT + noinst_PROGRAMS += test-service-generic test_service_generic_SOURCES = generic/tests/test-service-generic.c test_service_generic_CPPFLAGS = $(TEST_COMMON_COMPILER_FLAGS) test_service_generic_LDADD = $(TEST_COMMON_LIBADD_FLAGS) test_service_generic_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) +endif + ## Motorola libmm_plugin_motorola_la_SOURCES = \ motorola/mm-plugin-motorola.c \ |