Commit e9e3de91 authored by Simon McVittie's avatar Simon McVittie

Imported Upstream version 1.5.10

parent 179af6d3
......@@ -208,16 +208,19 @@ To make a release of D-Bus, do the following:
- post to dbus@lists.freedesktop.org announcing the release.
After making a ".0" stable release
Making a ".0" stable release
===
We create a branch for each stable release; sometimes the branch is
not done immediately, instead it's possible to wait until someone has
a not-suitable-for-stable change they want to make and then branch to
allow committing that change.
We create a branch for each stable release. The branch name should be
dbus-X.Y which is a branch that has releases versioned X.Y.Z;
changes on a stable branch should be limited to significant bug fixes.
The branch name should be dbus-X.Y which is a branch that has
releases versioned X.Y.Z
Because we won't make minor changes like keeping up with the latest
deprecations on a stable branch, stable branches should turn off the
gcc warning for deprecated declarations (e.g. see commit 4ebb275ab7).
Be extra-careful not to merge master (or any branch based on master) into a
stable branch.
To branch:
git branch dbus-X.Y
......
This diff is collapsed.
D-Bus 1.5.10 (2012-02-21)
==
The "fire in Delerium" release.
On Unix platforms, PTHREAD_MUTEX_RECURSIVE (as specified in POSIX 2008 Base
and SUSv2) is now required.
• D-Bus Specification 0.19:
· Formally define unique connection names and well-known bus names,
and document best practices for interface, bus, member and error names,
and object paths (fd.o #37095, Simon McVittie)
· Document the search path for session and system services on Unix, and
where they should be installed by build systems (fd.o #21620, fd.o #35306;
Simon McVittie)
· Document the systemd transport (fd.o #35232, Lennart Poettering)
• Make dbus_threads_init() use the same built-in threading implementation
as dbus_threads_init_default(); the user-specified primitives that it
takes as a parameter are now ignored (fd.o #43744, Simon McVittie)
• Allow all configured auth mechanisms, not just one (fd.o #45106,
Pavel Strashkin)
• Improve cmake build system (Ralf Habacker):
· simplify XML parser dependencies (fd.o #41027)
· generate build timestamp (fd.o #41029)
· only create batch files on Windows
· fix option and cache syntax
· add help-options target
· share dbus-arch-deps.h.in with autotools rather than having our
own version (fd.o #41033)
• Build tests successfully with older GLib, as found in e.g. Debian 6
(fd.o #41219, Simon McVittie)
• Avoid use of deprecated GThread API (fd.o #44413, Martin Pitt)
• Build documentation correctly if man2html doesn't support filenames on
its command-line (fd.o #43875, Jack Nagel)
• Improve test coverage. To get even more coverage, run the tests with
DBUS_TEST_SLOW=1 (fd.o #38285, #42811; Simon McVittie)
• Reduce the size of the shared library by moving functionality only used
by dbus-daemon, tests etc. into their internal library and deleting
unused code (fd.o #34976, #39759; Simon McVittie)
• Add dbus-daemon --nopidfile option, overriding the configuration, for
setups where the default configuration must include <pidfile/> to avoid
breaking traditional init, but the pid file is in fact unnecessary; use
it under systemd to improve startup time a bit (fd.o #45520,
Lennart Poettering)
• Optionally (if configured --with-valgrind) add instrumentation to debug
libdbus and associated tools more meaningfully under Valgrind
(fd.o #37286, Simon McVittie)
• Improve the dbus-send(1) man page (fd.o #14005, Simon McVittie)
• Make dbus-protocol.h compatible with C++11 (fd.o #46147, Marc Mutz)
• If tests are enabled and DBUS_MALLOC_CANNOT_FAIL is set in the environment,
abort on failure to malloc() (like GLib does), to turn runaway memory leaks
into a debuggable core-dump if a resource limit is applied (fd.o #41048,
Simon McVittie)
• Don't crash if realloc() returns NULL in a debug build (fd.o #41048,
Simon McVittie)
• Unix-specific:
· Replace our broken reimplementation of recursive mutexes, which has
been broken since 2006, with an ordinary pthreads recursive mutex
(fd.o #43744; Sigmund Augdal, Simon McVittie)
· Use epoll(7) for a more efficient main loop in Linux; equivalent patches
welcomed for other OSs' equivalents like kqueue, /dev/poll, or Solaris
event ports (fd.o #33337; Simon McVittie, Ralf Habacker)
· When running under systemd, use it instead of ConsoleKit to check
whether to apply at_console policies (fd.o #39609, Lennart Poettering)
· Avoid a highly unlikely fd leak (fd.o #29881, Simon McVittie)
· Don't close invalid fd -1 if getaddrinfo fails (fd.o #37258, eXeC001er)
  · Don't touch ~/.dbus and ~/.dbus-keyrings when running 'make installcheck'
(fd.o #41218, Simon McVittie)
· Stop pretending we respect XDG_DATA_DIRS for system services: the launch
helper doesn't obey environment variables to avoid privilege escalation
attacks, so make the system bus follow the same rules
(fd.o #21620, Simon McVittie)
• Windows-specific:
· Find the dbus-daemon executable next to the shared library (fd.o #41558;
Jesper Dam, Ralf Habacker)
· Remove the faulty implementation of _dbus_condvar_wake_all (fd.o #44609,
Simon McVittie)
D-Bus 1.5.8 (2011-09-21)
==
......
......@@ -11,6 +11,10 @@ DBus comes with a test suite which is used on unix to guarantate
production quality and this test suite runs mostly. There are some
test not running yet and there is help needed to get them running.
Supported compilers
-------------------
On windows Microsoft Visual Studio 2010 (Express and professional variants)
and mingw-w64|32 are known to work.
Building
--------
......
This diff is collapsed.
This diff is collapsed.
......@@ -1427,6 +1427,16 @@ remove_babysitter_watch (DBusWatch *watch,
watch);
}
static void
toggle_babysitter_watch (DBusWatch *watch,
void *data)
{
BusPendingActivation *pending_activation = data;
_dbus_loop_toggle_watch (bus_context_get_loop (pending_activation->activation->context),
watch);
}
static dbus_bool_t
pending_activation_timed_out (void *data)
{
......@@ -2110,7 +2120,7 @@ bus_activation_activate_service (BusActivation *activation,
if (!_dbus_babysitter_set_watch_functions (pending_activation->babysitter,
add_babysitter_watch,
remove_babysitter_watch,
NULL,
toggle_babysitter_watch,
pending_activation,
NULL))
{
......
......@@ -126,6 +126,18 @@ remove_server_watch (DBusWatch *watch,
_dbus_loop_remove_watch (context->loop, watch);
}
static void
toggle_server_watch (DBusWatch *watch,
void *data)
{
DBusServer *server = data;
BusContext *context;
context = server_get_context (server);
_dbus_loop_toggle_watch (context->loop, watch);
}
static dbus_bool_t
add_server_timeout (DBusTimeout *timeout,
void *data)
......@@ -228,7 +240,7 @@ setup_server (BusContext *context,
if (!dbus_server_set_watch_functions (server,
add_server_watch,
remove_server_watch,
NULL,
toggle_server_watch,
server,
NULL))
{
......@@ -257,7 +269,7 @@ static dbus_bool_t
process_config_first_time_only (BusContext *context,
BusConfigParser *parser,
const DBusString *address,
dbus_bool_t systemd_activation,
BusContextFlags flags,
DBusError *error)
{
DBusString log_prefix;
......@@ -273,17 +285,24 @@ process_config_first_time_only (BusContext *context,
retval = FALSE;
auth_mechanisms = NULL;
pidfile = NULL;
_dbus_init_system_log ();
context->systemd_activation = systemd_activation;
if (flags & BUS_CONTEXT_FLAG_SYSTEMD_ACTIVATION)
context->systemd_activation = TRUE;
else
context->systemd_activation = FALSE;
/* Check for an existing pid file. Of course this is a race;
* we'd have to use fcntl() locks on the pid file to
* avoid that. But we want to check for the pid file
* before overwriting any existing sockets, etc.
*/
pidfile = bus_config_parser_get_pidfile (parser);
if (flags & BUS_CONTEXT_FLAG_WRITE_PID_FILE)
pidfile = bus_config_parser_get_pidfile (parser);
if (pidfile != NULL)
{
DBusString u;
......@@ -392,6 +411,7 @@ process_config_first_time_only (BusContext *context,
if (auth_mechanisms[i] == NULL)
goto oom;
link = _dbus_list_get_next_link (auth_mechanisms_list, link);
i += 1;
}
}
else
......@@ -680,16 +700,18 @@ process_config_postinit (BusContext *context,
BusContext*
bus_context_new (const DBusString *config_file,
ForceForkSetting force_fork,
BusContextFlags flags,
DBusPipe *print_addr_pipe,
DBusPipe *print_pid_pipe,
const DBusString *address,
dbus_bool_t systemd_activation,
DBusError *error)
{
BusContext *context;
BusConfigParser *parser;
_dbus_assert ((flags & BUS_CONTEXT_FLAG_FORK_NEVER) == 0 ||
(flags & BUS_CONTEXT_FLAG_FORK_ALWAYS) == 0);
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
context = NULL;
......@@ -738,7 +760,7 @@ bus_context_new (const DBusString *config_file,
goto failed;
}
if (!process_config_first_time_only (context, parser, address, systemd_activation, error))
if (!process_config_first_time_only (context, parser, address, flags, error))
{
_DBUS_ASSERT_ERROR_IS_SET (error);
goto failed;
......@@ -833,7 +855,8 @@ bus_context_new (const DBusString *config_file,
if (context->pidfile)
_dbus_string_init_const (&u, context->pidfile);
if ((force_fork != FORK_NEVER && context->fork) || force_fork == FORK_ALWAYS)
if (((flags & BUS_CONTEXT_FLAG_FORK_NEVER) == 0 && context->fork) ||
(flags & BUS_CONTEXT_FLAG_FORK_ALWAYS))
{
_dbus_verbose ("Forking and becoming daemon\n");
......
......@@ -66,17 +66,18 @@ typedef struct
typedef enum
{
FORK_FOLLOW_CONFIG_FILE,
FORK_ALWAYS,
FORK_NEVER
} ForceForkSetting;
BUS_CONTEXT_FLAG_NONE = 0,
BUS_CONTEXT_FLAG_FORK_ALWAYS = (1 << 1),
BUS_CONTEXT_FLAG_FORK_NEVER = (1 << 2),
BUS_CONTEXT_FLAG_WRITE_PID_FILE = (1 << 3),
BUS_CONTEXT_FLAG_SYSTEMD_ACTIVATION = (1 << 4)
} BusContextFlags;
BusContext* bus_context_new (const DBusString *config_file,
ForceForkSetting force_fork,
BusContextFlags flags,
DBusPipe *print_addr_pipe,
DBusPipe *print_pid_pipe,
const DBusString *address,
dbus_bool_t systemd_activation,
DBusError *error);
dbus_bool_t bus_context_reload_config (BusContext *context,
DBusError *error);
......
......@@ -3393,8 +3393,8 @@ test_default_session_servicedirs (void)
static const char *test_system_service_dir_matches[] =
{
#ifdef DBUS_UNIX
"/testusr/testlocal/testshare/dbus-1/system-services",
"/testusr/testshare/dbus-1/system-services",
"/usr/local/share/dbus-1/system-services",
"/usr/share/dbus-1/system-services",
#endif
DBUS_DATADIR"/dbus-1/system-services",
#ifdef DBUS_UNIX
......
......@@ -327,6 +327,15 @@ remove_connection_watch (DBusWatch *watch,
_dbus_loop_remove_watch (connection_get_loop (connection), watch);
}
static void
toggle_connection_watch (DBusWatch *watch,
void *data)
{
DBusConnection *connection = data;
_dbus_loop_toggle_watch (connection_get_loop (connection), watch);
}
static dbus_bool_t
add_connection_timeout (DBusTimeout *timeout,
void *data)
......@@ -631,7 +640,7 @@ bus_connections_setup_connection (BusConnections *connections,
if (!dbus_connection_set_watch_functions (connection,
add_connection_watch,
remove_connection_watch,
NULL,
toggle_connection_watch,
connection,
NULL))
goto out;
......
......@@ -4,8 +4,6 @@ Requires=dbus.socket
After=syslog.target
[Service]
ExecStartPre=@EXPANDED_BINDIR@/dbus-uuidgen --ensure
ExecStartPre=-/bin/rm -f @DBUS_SYSTEM_PID_FILE@
ExecStart=@EXPANDED_BINDIR@/dbus-daemon --system --address=systemd: --nofork --systemd-activation
ExecStart=@EXPANDED_BINDIR@/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
ExecReload=@EXPANDED_BINDIR@/dbus-send --print-reply --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig
OOMScoreAdjust=-900
......@@ -41,17 +41,10 @@
#include <unistd.h>
#endif
#ifndef TEST_CONNECTION
/*
TODO autotools:
move to build system as already done for cmake
*/
#ifdef DBUS_UNIX
#define TEST_CONNECTION "debug-pipe:name=test-server"
#else
#define TEST_CONNECTION "tcp:host=localhost,port=1234"
#endif
#endif
/* This is hard-coded in the files in valid-config-files-*. We have to use
* the debug-pipe transport because the tests in this file require that
* dbus_connection_open_private() does not block. */
#define TEST_DEBUG_PIPE "debug-pipe:name=test-server"
static dbus_bool_t
send_one_message (DBusConnection *connection,
......@@ -1532,7 +1525,7 @@ check_hello_connection (BusContext *context)
dbus_error_init (&error);
connection = dbus_connection_open_private (TEST_CONNECTION, &error);
connection = dbus_connection_open_private (TEST_DEBUG_PIPE, &error);
if (connection == NULL)
{
_DBUS_ASSERT_ERROR_IS_SET (&error);
......@@ -4501,7 +4494,7 @@ bus_dispatch_test_conf (const DBusString *test_data_dir,
if (context == NULL)
return FALSE;
foo = dbus_connection_open_private (TEST_CONNECTION, &error);
foo = dbus_connection_open_private (TEST_DEBUG_PIPE, &error);
if (foo == NULL)
_dbus_assert_not_reached ("could not alloc connection");
......@@ -4519,7 +4512,7 @@ bus_dispatch_test_conf (const DBusString *test_data_dir,
if (!check_add_match_all (context, foo))
_dbus_assert_not_reached ("AddMatch message failed");
bar = dbus_connection_open_private (TEST_CONNECTION, &error);
bar = dbus_connection_open_private (TEST_DEBUG_PIPE, &error);
if (bar == NULL)
_dbus_assert_not_reached ("could not alloc connection");
......@@ -4534,7 +4527,7 @@ bus_dispatch_test_conf (const DBusString *test_data_dir,
if (!check_add_match_all (context, bar))
_dbus_assert_not_reached ("AddMatch message failed");
baz = dbus_connection_open_private (TEST_CONNECTION, &error);
baz = dbus_connection_open_private (TEST_DEBUG_PIPE, &error);
if (baz == NULL)
_dbus_assert_not_reached ("could not alloc connection");
......@@ -4650,7 +4643,7 @@ bus_dispatch_test_conf_fail (const DBusString *test_data_dir,
if (context == NULL)
return FALSE;
foo = dbus_connection_open_private (TEST_CONNECTION, &error);
foo = dbus_connection_open_private (TEST_DEBUG_PIPE, &error);
if (foo == NULL)
_dbus_assert_not_reached ("could not alloc connection");
......@@ -4733,7 +4726,7 @@ bus_dispatch_sha1_test (const DBusString *test_data_dir)
if (context == NULL)
return FALSE;
foo = dbus_connection_open_private (TEST_CONNECTION, &error);
foo = dbus_connection_open_private (TEST_DEBUG_PIPE, &error);
if (foo == NULL)
_dbus_assert_not_reached ("could not alloc connection");
......@@ -4782,7 +4775,7 @@ bus_unix_fds_passing_test(const DBusString *test_data_dir)
if (context == NULL)
_dbus_assert_not_reached ("could not alloc context");
foo = dbus_connection_open_private (TEST_CONNECTION, &error);
foo = dbus_connection_open_private (TEST_DEBUG_PIPE, &error);
if (foo == NULL)
_dbus_assert_not_reached ("could not alloc connection");
......@@ -4797,7 +4790,7 @@ bus_unix_fds_passing_test(const DBusString *test_data_dir)
if (!check_add_match_all (context, foo))
_dbus_assert_not_reached ("AddMatch message failed");
bar = dbus_connection_open_private (TEST_CONNECTION, &error);
bar = dbus_connection_open_private (TEST_DEBUG_PIPE, &error);
if (bar == NULL)
_dbus_assert_not_reached ("could not alloc connection");
......
......@@ -125,7 +125,7 @@ signal_handler (int sig)
static void
usage (void)
{
fprintf (stderr, DBUS_DAEMON_NAME " [--version] [--session] [--system] [--config-file=FILE] [--print-address[=DESCRIPTOR]] [--print-pid[=DESCRIPTOR]] [--fork] [--nofork] [--introspect] [--address=ADDRESS] [--systemd-activation]\n");
fprintf (stderr, DBUS_DAEMON_NAME " [--version] [--session] [--system] [--config-file=FILE] [--print-address[=DESCRIPTOR]] [--print-pid[=DESCRIPTOR]] [--fork] [--nofork] [--introspect] [--address=ADDRESS] [--systemd-activation] [--nopidfile]\n");
exit (1);
}
......@@ -355,8 +355,7 @@ main (int argc, char **argv)
int i;
dbus_bool_t print_address;
dbus_bool_t print_pid;
int force_fork;
dbus_bool_t systemd_activation;
BusContextFlags flags;
if (!_dbus_string_init (&config_file))
return 1;
......@@ -372,8 +371,8 @@ main (int argc, char **argv)
print_address = FALSE;
print_pid = FALSE;
force_fork = FORK_FOLLOW_CONFIG_FILE;
systemd_activation = FALSE;
flags = BUS_CONTEXT_FLAG_WRITE_PID_FILE;
prev_arg = NULL;
i = 1;
......@@ -384,17 +383,35 @@ main (int argc, char **argv)
if (strcmp (arg, "--help") == 0 ||
strcmp (arg, "-h") == 0 ||
strcmp (arg, "-?") == 0)
usage ();
{
usage ();
}
else if (strcmp (arg, "--version") == 0)
version ();
{
version ();
}
else if (strcmp (arg, "--introspect") == 0)
introspect ();
{
introspect ();
}
else if (strcmp (arg, "--nofork") == 0)
force_fork = FORK_NEVER;
{
flags &= ~BUS_CONTEXT_FLAG_FORK_ALWAYS;
flags |= BUS_CONTEXT_FLAG_FORK_NEVER;
}
else if (strcmp (arg, "--fork") == 0)
force_fork = FORK_ALWAYS;
{
flags &= ~BUS_CONTEXT_FLAG_FORK_NEVER;
flags |= BUS_CONTEXT_FLAG_FORK_ALWAYS;
}
else if (strcmp (arg, "--nopidfile") == 0)
{
flags &= ~BUS_CONTEXT_FLAG_WRITE_PID_FILE;
}
else if (strcmp (arg, "--systemd-activation") == 0)
systemd_activation = TRUE;
{
flags |= BUS_CONTEXT_FLAG_SYSTEMD_ACTIVATION;
}
else if (strcmp (arg, "--system") == 0)
{
check_two_config_files (&config_file, "system");
......@@ -430,7 +447,9 @@ main (int argc, char **argv)
exit (1);
}
else if (strcmp (arg, "--config-file") == 0)
; /* wait for next arg */
{
/* wait for next arg */
}
else if (strstr (arg, "--address=") == arg)
{
const char *file;
......@@ -452,7 +471,9 @@ main (int argc, char **argv)
exit (1);
}
else if (strcmp (arg, "--address") == 0)
; /* wait for next arg */
{
/* wait for next arg */
}
else if (strstr (arg, "--print-address=") == arg)
{
const char *desc;
......@@ -478,7 +499,9 @@ main (int argc, char **argv)
print_address = TRUE;
}
else if (strcmp (arg, "--print-address") == 0)
print_address = TRUE; /* and we'll get the next arg if appropriate */
{
print_address = TRUE; /* and we'll get the next arg if appropriate */
}
else if (strstr (arg, "--print-pid=") == arg)
{
const char *desc;
......@@ -504,9 +527,13 @@ main (int argc, char **argv)
print_pid = TRUE;
}
else if (strcmp (arg, "--print-pid") == 0)
print_pid = TRUE; /* and we'll get the next arg if appropriate */
{
print_pid = TRUE; /* and we'll get the next arg if appropriate */
}
else
usage ();
{
usage ();
}
prev_arg = arg;
......@@ -570,10 +597,9 @@ main (int argc, char **argv)
}
dbus_error_init (&error);
context = bus_context_new (&config_file, force_fork,
context = bus_context_new (&config_file, flags,
&print_addr_pipe, &print_pid_pipe,
_dbus_string_get_length(&address) > 0 ? &address : NULL,
systemd_activation,
&error);
_dbus_string_free (&config_file);
if (context == NULL)
......
......@@ -28,7 +28,7 @@
#include <dbus/dbus-string.h>
#include <dbus/dbus-sysdeps.h>
#include <dbus/dbus-internals.h>
#include <dbus/dbus-message-private.h>
#include <dbus/dbus-message-internal.h>
#include "selinux.h"
#ifdef DBUS_BUILD_TESTS
......
......@@ -50,6 +50,13 @@ remove_client_watch (DBusWatch *watch,
_dbus_loop_remove_watch (client_loop, watch);
}
static void
toggle_client_watch (DBusWatch *watch,
void *data)
{
_dbus_loop_toggle_watch (client_loop, watch);
}
static dbus_bool_t
add_client_timeout (DBusTimeout *timeout,
void *data)
......@@ -112,7 +119,7 @@ bus_setup_debug_client (DBusConnection *connection)
if (!dbus_connection_set_watch_functions (connection,
add_client_watch,
remove_client_watch,
NULL,
toggle_client_watch,
connection,
NULL))
goto out;
......@@ -285,7 +292,7 @@ bus_context_new_test (const DBusString *test_data_dir,
}
dbus_error_init (&error);
context = bus_context_new (&config_file, FALSE, NULL, NULL, NULL, FALSE, &error);
context = bus_context_new (&config_file, BUS_CONTEXT_FLAG_NONE, NULL, NULL, NULL, &error);
if (context == NULL)
{
_DBUS_ASSERT_ERROR_IS_SET (&error);
......
project(dbus)
#########################################################################
# detect version
#########################################################################
file (READ ../configure.ac configure_ac)
string (REGEX REPLACE ".*dbus_major_version], .([0-9]+).*" "\\1" DBUS_MAJOR_VERSION ${configure_ac})
string (REGEX REPLACE ".*dbus_minor_version], .([0-9]+).*" "\\1" DBUS_MINOR_VERSION ${configure_ac})
string (REGEX REPLACE ".*dbus_micro_version], .([0-9]+).*" "\\1" DBUS_MICRO_VERSION ${configure_ac})
# used by file version info
set (DBUS_PATCH_VERSION "0")
set (DBUS_VERSION ${DBUS_MAJOR_VERSION}.${DBUS_MINOR_VERSION}.${DBUS_MICRO_VERSION})
set (DBUS_VERSION_STRING "${DBUS_VERSION}")
if (NOT DBUS_BUILD_TIMESTAMP)
message(STATUS "FIXME set DBUS_BUILD_TIMESTAMP to current date or fix current time stamp generation for having actual build date in version file info")
set (DBUS_BUILD_TIMESTAMP 20091231)
endif (NOT DBUS_BUILD_TIMESTAMP)
# we need to be up to date
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.4 FATAL_ERROR)
if(COMMAND cmake_policy)
......@@ -27,6 +9,15 @@ endif(COMMAND cmake_policy)
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/modules")
# detect version
include(MacrosAutotools)
autoversion(../configure.ac dbus)
# used by file version info
set (DBUS_PATCH_VERSION "0")
include(Macros)
TIMESTAMP(DBUS_BUILD_TIMESTAMP)
########### basic vars ###############
......@@ -87,9 +78,8 @@ if (WIN32)
include(Win32Macros)
addExplorerWrapper(${CMAKE_PROJECT_NAME})
endif (WIN32)
find_package(LibXml2)
find_package(LibExpat)
find_package(X11)
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)
......@@ -102,6 +92,13 @@ option (DBUS_ENABLE_STATS "enable bus daemon usage statistics" OFF)
option (DBUS_ENABLE_STATS "enable bus daemon usage statistics" OFF)
if (DBUS_USE_EXPAT)
find_package(LibExpat)
else ()
find_package(LibXml2)
endif ()
find_package(X11)
# analogous to AC_USE_SYSTEM_EXTENSIONS in configure.ac
add_definitions(-D_POSIX_C_SOURCE=199309L -D_GNU_SOURCE)
......@@ -116,7 +113,6 @@ include (MacroLibrary)
if(VCS)
set(DBUS_VERBOSE_C_S 1 CACHE STRING "verbose mode" FORCE)
set(DBUS_VERBOSE_C_S 1)
endif(VCS)
if(WIN32)
......@@ -301,12 +297,6 @@ if(NOT LIBXML2_FOUND AND NOT LIBEXPAT_FOUND)
message(FATAL "Neither expat nor libxml2 found!")
endif(NOT LIBXML2_FOUND AND NOT LIBEXPAT_FOUND)
if(LIBEXPAT_FOUND)
option (DBUS_USE_EXPAT "Use expat (== ON) or libxml2 (==OFF)" ON)
else(LIBEXPAT_FOUND)
option (DBUS_USE_EXPAT "Use expat (== ON) or libxml2 (==OFF)" OFF)
endif(LIBEXPAT_FOUND)
if(DBUS_USE_EXPAT)
SET(XML_LIB "Expat")
SET(XML_LIBRARY ${LIBEXPAT_LIBRARIES})
......@@ -361,19 +351,21 @@ endif(X11_FOUND)
# test binary names
if (WIN32)
set (EXT ".exe")
# Automake calls this EXEEXT, and CMake doesn't have a standard name
# for it; follow Automake's naming convention so we can share .in files
set (EXEEXT ".exe")
endif(WIN32)
if (MSVC_IDE)
if(CMAKE_BUILD_TYPE MATCHES Debug)