From 74651d3b1788a755ad78ec41d80612d50123db4d Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 12 Jun 2013 19:14:40 +0100 Subject: [PATCH] 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 Reviewed-by: David Zeuthen --- dbus/Makefile.am | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/dbus/Makefile.am b/dbus/Makefile.am index fe9c93f..90c2c90 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 -- 2.7.4