From 9875480ed476f3c8ff3c7bdc35430342c440633e Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 15 Jun 2011 14:21:14 +0100 Subject: [PATCH] test: reverse assumption regarding static/dynamic linking If we change the default assumption to be that new tests will be dynamically-linked to libdbus, those tests can be useful for installcheck or even for installation. Accordingly, explicitly use new variable $(static_cppflags) for all tests that need static linking. --- test/Makefile.am | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/test/Makefile.am b/test/Makefile.am index 0448dca87..fd687cd71 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -88,15 +88,22 @@ test_segfault_SOURCES = \ test_sleep_forever_SOURCES = \ test-sleep-forever.c -# This assumes that most tests will be linked to libdbus-internal; -# tests linked to only the public libdbus have their own CPPFLAGS. -AM_CPPFLAGS=-DDBUS_STATIC_BUILD +static_cppflags = \ + $(AM_CPPFLAGS) \ + -DDBUS_STATIC_BUILD \ + $(NULL) +test_service_CPPFLAGS = $(static_cppflags) test_service_LDADD = libdbus-testutils.la +test_names_CPPFLAGS = $(static_cppflags) test_names_LDADD = libdbus-testutils.la +## break_loader_CPPFLAGS = $(static_cppflags) ## break_loader_LDADD = $(top_builddir)/dbus/libdbus-internal.la +test_shell_service_CPPFLAGS = $(static_cppflags) test_shell_service_LDADD = libdbus-testutils.la +shell_test_CPPFLAGS = $(static_cppflags) shell_test_LDADD = libdbus-testutils.la +spawn_test_CPPFLAGS = $(static_cppflags) spawn_test_LDADD = $(top_builddir)/dbus/libdbus-internal.la EXTRA_DIST = dbus-test-runner -- 2.47.3