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>
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 \
$(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