diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2013-06-12 19:14:40 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2013-06-12 19:47:15 +0100 |
commit | 74651d3b1788a755ad78ec41d80612d50123db4d (patch) | |
tree | 2a0973ccba823c9d62ad01c8c87d5e2e928cc927 | |
parent | dab4284a24da2b6c015fd89fa953f177af7867b4 (diff) |
Move libdbus-init-win.cpp to its own convenience library
Otherwise libdbus-1 ends up linked as if it contained C++, even
on Unix, where it doesn't; in turn, that makes it export all the
underscore-prefixed symbols that aren't meant to be exported.
Reviewed-by: Thiago Macieira <thiago@kde.org>
Reviewed-by: David Zeuthen <davidz@redhat.com>
-rw-r--r-- | dbus/Makefile.am | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/dbus/Makefile.am b/dbus/Makefile.am index fe9c93f2..90c2c901 100644 --- a/dbus/Makefile.am +++ b/dbus/Makefile.am @@ -72,7 +72,6 @@ endif DBUS_SHARED_arch_sources = \ $(wince_source) \ dbus-file-win.c \ - dbus-init-win.cpp \ dbus-pipe-win.c \ dbus-sockets-win.h \ dbus-sysdeps-win.c \ @@ -296,6 +295,17 @@ libdbus_internal_la_CPPFLAGS = \ $(NULL) libdbus_internal_la_LIBADD=$(LIBDBUS_LIBS) $(SYSTEMD_LIBS) +if DBUS_WIN +# This must be a separate convenience library, otherwise libtool notices +# that libdbus-1 might contain C++, links it with g++ and links in libstdc++, +# even on Unix where in fact it doesn't contain any C++. For Windows, where +# this code is used, we don't actually need libstdc++. +noinst_LTLIBRARIES += libdbus-init-win.la +libdbus_init_win_la_SOURCES = dbus-init-win.cpp +libdbus_1_la_LIBADD += libdbus-init-win.la +libdbus_internal_la_LIBADD += libdbus-init-win.la +endif + noinst_PROGRAMS = if DBUS_BUILD_TESTS |