build: only compile dbus tests if GIO >= 2.34 is available

This commit is contained in:
Aleksander Morgado
2015-04-17 09:58:24 +02:00
parent cc5f731102
commit d5adce08f5
2 changed files with 11 additions and 0 deletions
+4
View File
@@ -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
+7
View File
@@ -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 \