summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2012-06-15 16:03:49 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2012-06-15 16:03:49 +0100
commit9073e06039537c9633d55402ee8385b0375bd447 (patch)
tree4b6e2c6cfd2a19e99994ee81a66bfb9a533b1134
parent5a100d8c2ce5301322a4ad65e2999c61fe48945f (diff)
parent3624e65986453d90ff571bdb738b4370f621cf88 (diff)
downloaddbus-9073e06039537c9633d55402ee8385b0375bd447.tar.gz
Merge branch 'dbus-1.6'
-rw-r--r--NEWS11
-rw-r--r--cmake/CMakeLists.txt2
-rw-r--r--cmake/dbus/CMakeLists.txt4
-rw-r--r--configure.ac10
-rw-r--r--dbus-1-uninstalled.pc.in2
-rw-r--r--dbus-1.pc.in2
-rw-r--r--test/Makefile.am3
-rw-r--r--tools/Makefile.am1
8 files changed, 30 insertions, 5 deletions
diff --git a/NEWS b/NEWS
index 3dd3c2d2..a1778bf4 100644
--- a/NEWS
+++ b/NEWS
@@ -3,9 +3,14 @@ D-Bus 1.7.0 (UNRELEASED)
Fixes:
-• Add dbus-launch --exit-with-x11 option. Distributions should use this
- in their X11 session startup infrastructure, in preference to
- the --exit-with-session option. (fd.o #39197, Simon McVittie)
+• Automatically define DBUS_STATIC_BUILD in static-only Autotools builds,
+ fixing linking when targeting Windows (fd.o #33973; william, Simon McVittie)
+
+• Unix-specific:
+ · Add dbus-launch --exit-with-x11 option. Distributions should use this
+ in their X11 session startup infrastructure, in preference to
+ the --exit-with-session option. (fd.o #39197, Simon McVittie)
+ · Check for libpthread under CMake on Unix (fd.o #47237, Simon McVittie)
D-Bus 1.6.0 (2012-06-05)
==
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index ba44d575..000acda2 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -83,6 +83,8 @@ option (DBUS_USE_EXPAT "Use expat (== ON) or libxml2 (==OFF)" ON)
if(NOT WIN32)
option (DBUS_ENABLE_ABSTRACT_SOCKETS "enable support for abstract sockets" ON)
+ set (CMAKE_THREAD_PREFER_PTHREAD ON)
+ include (FindThreads)
endif(NOT WIN32)
#AC_ARG_ENABLE(asserts, AS_HELP_STRING([--enable-asserts],[include assertion checks]),enable_asserts=$enableval,enable_asserts=$USE_MAINTAINER_MODE)
diff --git a/cmake/dbus/CMakeLists.txt b/cmake/dbus/CMakeLists.txt
index 13d6f87a..d09e63df 100644
--- a/cmake/dbus/CMakeLists.txt
+++ b/cmake/dbus/CMakeLists.txt
@@ -266,6 +266,8 @@ if(WIN32)
else(WINCE)
target_link_libraries(dbus-1 ws2_32 advapi32 netapi32)
endif(WINCE)
+else(WIN32)
+ target_link_libraries(dbus-1 ${CMAKE_THREAD_LIBS_INIT})
endif(WIN32)
install_targets(/lib dbus-1 )
@@ -289,6 +291,8 @@ if(WIN32)
else(WINCE)
target_link_libraries(dbus-internal ws2_32 advapi32 netapi32)
endif(WINCE)
+else(WIN32)
+ target_link_libraries(dbus-internal ${CMAKE_THREAD_LIBS_INIT})
endif(WIN32)
if (DBUS_BUILD_TESTS)
diff --git a/configure.ac b/configure.ac
index ad7459d6..59d8646c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -123,6 +123,16 @@ AM_CONDITIONAL(DBUS_WINCE, test "$dbus_wince" = yes)
AM_CONDITIONAL(DBUS_UNIX, test "$dbus_unix" = yes)
AM_CONDITIONAL(DBUS_CYGWIN, test "$dbus_cygwin" = yes)
+DBUS_STATIC_BUILD_CPPFLAGS=
+if test "x$enable_shared" = xno; then
+ # On Windows, linking against the static library requires special effort
+ # to turn off DLL import/export processing. We normally link some things
+ # against the dynamic library, but if we're not building that, we'll
+ # have to link everything statically.
+ DBUS_STATIC_BUILD_CPPFLAGS=-DDBUS_STATIC_BUILD
+fi
+AC_SUBST([DBUS_STATIC_BUILD_CPPFLAGS])
+
AC_ARG_ENABLE(ansi, AS_HELP_STRING([--enable-ansi],[enable -ansi -pedantic gcc flags]),enable_ansi=$enableval,enable_ansi=no)
AC_ARG_ENABLE(verbose-mode, AS_HELP_STRING([--enable-verbose-mode],[support verbose debug mode]),enable_verbose_mode=$enableval,enable_verbose_mode=$USE_MAINTAINER_MODE)
AC_ARG_ENABLE(asserts, AS_HELP_STRING([--enable-asserts],[include assertion checks]),enable_asserts=$enableval,enable_asserts=$USE_MAINTAINER_MODE)
diff --git a/dbus-1-uninstalled.pc.in b/dbus-1-uninstalled.pc.in
index f0072325..038c83e2 100644
--- a/dbus-1-uninstalled.pc.in
+++ b/dbus-1-uninstalled.pc.in
@@ -14,4 +14,4 @@ Description: Free desktop message bus (uninstalled copy)
Version: @VERSION@
Libs: ${abs_top_builddir}/dbus/libdbus-1.la
Libs.private: @LIBDBUS_LIBS@
-Cflags: -I${abs_top_srcdir}
+Cflags: -I${abs_top_srcdir} @DBUS_STATIC_BUILD_CPPFLAGS@
diff --git a/dbus-1.pc.in b/dbus-1.pc.in
index 7201e07f..25f8bcee 100644
--- a/dbus-1.pc.in
+++ b/dbus-1.pc.in
@@ -14,4 +14,4 @@ Description: Free desktop message bus
Version: @VERSION@
Libs: -L${libdir} -ldbus-1
Libs.private: @LIBDBUS_LIBS@
-Cflags: -I${includedir}/dbus-1.0 -I${libdir}/dbus-1.0/include
+Cflags: -I${includedir}/dbus-1.0 -I${libdir}/dbus-1.0/include @DBUS_STATIC_BUILD_CPPFLAGS@
diff --git a/test/Makefile.am b/test/Makefile.am
index aa04792b..e9448998 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -4,8 +4,10 @@
SUBDIRS= . name-test
DIST_SUBDIRS=name-test
+# CPPFLAGS for binaries that are normally dynamic
AM_CPPFLAGS = \
-I$(top_srcdir) \
+ $(DBUS_STATIC_BUILD_CPPFLAGS) \
$(GLIB_CFLAGS) \
$(DBUS_GLIB_CFLAGS) \
$(NULL)
@@ -13,6 +15,7 @@ AM_CPPFLAGS = \
# improve backtraces from test stuff
AM_LDFLAGS = @R_DYNAMIC_LDFLAG@
+# CPPFLAGS for binaries that are always static
static_cppflags = \
$(AM_CPPFLAGS) \
-DDBUS_STATIC_BUILD \
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 08b90234..c4632e3e 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -2,6 +2,7 @@ configdir=$(sysconfdir)/dbus-1
AM_CPPFLAGS = \
-I$(top_srcdir) \
+ $(DBUS_STATIC_BUILD_CPPFLAGS) \
$(DBUS_X_CFLAGS) \
-DDBUS_COMPILATION \
-DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/lib/dbus/machine-id"\" \