From: Simon McVittie Date: Wed, 15 Jun 2011 13:21:14 +0000 (+0100) Subject: test: reverse assumption regarding static/dynamic linking X-Git-Tag: dbus-1.5.6~16 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9875480ed;p=thirdparty%2Fdbus.git 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. --- 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