summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/CMakeLists.txt197
-rw-r--r--cmake/ConfigureChecks.cmake9
-rw-r--r--cmake/Doxyfile.cmake182
-rw-r--r--cmake/bus/CMakeLists.txt44
-rw-r--r--cmake/bus/dbus-daemon.xml752
-rw-r--r--cmake/config.h.cmake41
-rwxr-xr-xcmake/cross-compile.sh110
-rw-r--r--cmake/dbus-env.bat.cmake4
-rw-r--r--cmake/dbus/CMakeLists.txt30
-rw-r--r--cmake/doc/CMakeLists.txt90
-rw-r--r--cmake/modules/COPYING-CMAKE-SCRIPTS22
-rw-r--r--cmake/modules/CPackInstallConfig.cmake9
-rw-r--r--cmake/modules/FindGLIB.cmake42
-rw-r--r--cmake/modules/FindGLib2.cmake60
-rw-r--r--cmake/modules/FindGObject.cmake52
-rw-r--r--cmake/modules/FindLibExpat.cmake61
-rw-r--r--cmake/modules/Macros.cmake59
-rw-r--r--cmake/modules/MacrosAutotools.cmake60
-rw-r--r--cmake/test/CMakeLists.txt77
-rw-r--r--cmake/test/name-test/CMakeLists.txt48
-rw-r--r--cmake/tools/CMakeLists.txt2
-rw-r--r--cmake/tools/dbus-launch.xml240
-rw-r--r--cmake/tools/dbus-monitor.xml121
-rw-r--r--cmake/tools/dbus-send.xml143
24 files changed, 525 insertions, 1930 deletions
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 000acda2..c767c171 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -1,3 +1,9 @@
+# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/modules")
+
+# we do not need to have WIN32 defined
+set(CMAKE_LEGACY_CYGWIN_WIN32 0)
+
project(dbus)
# we need to be up to date
@@ -6,8 +12,6 @@ if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
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)
@@ -15,6 +19,14 @@ autoversion(../configure.ac dbus)
# used by file version info
set (DBUS_PATCH_VERSION "0")
+# set PACKAGE_... variables
+autopackage(
+ dbus
+ ${DBUS_VERSION_STRING}
+ "http://dbus.freedesktop.org"
+ "https://bugs.freedesktop.org/enter_bug.cgi?product=dbus"
+)
+
include(Macros)
TIMESTAMP(DBUS_BUILD_TIMESTAMP)
@@ -60,12 +72,18 @@ set(EXPANDED_SYSCONFDIR ${DBUS_INSTALL_DIR}/etc)
set(EXPANDED_DATADIR ${DBUS_INSTALL_DIR}/${DBUS_DATADIR})
set(DBUS_MACHINE_UUID_FILE ${DBUS_INSTALL_DIR}/lib/dbus/machine-id)
set(DBUS_BINDIR ${EXPANDED_BINDIR})
-set(DBUS_DAEMONDIR ${EXPANDED_BINDIR})
+set(DBUS_DAEMONDIR ${EXPANDED_BINDIR})
#enable building of shared library
SET(BUILD_SHARED_LIBS ON)
+if(WIN32)
+ set(INSTALL_TARGETS_DEFAULT_ARGS RUNTIME DESTINATION "bin" LIBRARY DESTINATION "lib" ARCHIVE DESTINATION "lib")
+else()
+ set(INSTALL_TARGETS_DEFAULT_ARGS RUNTIME DESTINATION "${EXPANDED_LIBDIR}" LIBRARY DESTINATION "${EXPANDED_LIBDIR}" ARCHIVE DESTINATION "${EXPANDED_LIBDIR}")
+endif()
+
if (CYGWIN)
set (WIN32)
endif (CYGWIN)
@@ -79,30 +97,30 @@ if (WIN32)
addExplorerWrapper(${CMAKE_PROJECT_NAME})
endif (WIN32)
-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)
-option (DBUS_DISABLE_ASSERTS "Disable assertion checking" OFF)
+option (DBUS_DISABLE_ASSERT "Disable assertion checking" OFF)
option (DBUS_ENABLE_STATS "enable bus daemon usage statistics" OFF)
-option (DBUS_ENABLE_STATS "enable bus daemon usage statistics" OFF)
+if(WIN32)
+ set(FD_SETSIZE "8192" CACHE STRING "The maximum number of connections that can be handled at once")
+endif()
-if (DBUS_USE_EXPAT)
- find_package(LibExpat)
-else ()
- find_package(LibXml2)
-endif ()
+find_package(EXPAT)
find_package(X11)
+find_package(GLib2)
+find_package(GObject)
+if(GLIB2_FOUND AND GOBJECT_FOUND)
+ option (DBUS_WITH_GLIB "build with glib" ON)
+endif()
# analogous to AC_USE_SYSTEM_EXTENSIONS in configure.ac
-add_definitions(-D_POSIX_C_SOURCE=199309L -D_GNU_SOURCE)
+add_definitions(-D_GNU_SOURCE)
# do config checks
INCLUDE(ConfigureChecks.cmake)
@@ -157,12 +175,12 @@ if(WIN32)
endif(MSVC)
endif(WIN32)
-if (UNIX AND NOT DBUS_DISABLE_ASSERTS)
+if (UNIX AND NOT DBUS_DISABLE_ASSERT)
# required for backtrace
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wl,--export-dynamic")
SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Wl,--export-dynamic")
add_definitions(-DDBUS_BUILT_R_DYNAMIC)
-endif (UNIX AND NOT DBUS_DISABLE_ASSERTS)
+endif (UNIX AND NOT DBUS_DISABLE_ASSERT)
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG")
@@ -227,11 +245,12 @@ ENABLE_TESTING()
########### command line options ###############
# TODO: take check from configure.in
-#AC_ARG_ENABLE(tests, AS_HELP_STRING([--enable-tests],[enable unit test code]),enable_tests=$enableval,enable_tests=$USE_MAINTAINER_MODE)
option (DBUS_BUILD_TESTS "enable unit test code" ON)
if(DBUS_BUILD_TESTS)
- add_definitions(-DDBUS_BUILD_TESTS -DDBUS_ENABLE_EMBEDDED_TESTS)
+ set (DBUS_ENABLE_EMBEDDED_TESTS ON)
+ set (DBUS_ENABLE_MODULAR_TESTS ON)
+ add_definitions(-DDBUS_ENABLE_EMBEDDED_TESTS -DDBUS_ENABLE_MODULAR_TESTS)
endif(DBUS_BUILD_TESTS)
option (DBUS_USE_OUTPUT_DEBUG_STRING "enable win32 debug port for message output" OFF)
@@ -244,7 +263,6 @@ if(WIN32)
option (DBUS_SERVICE "enable dbus service installer" OFF)
endif(WIN32)
-#AC_ARG_ENABLE(ansi, AS_HELP_STRING([--enable-ansi],[enable -ansi -pedantic gcc flags]),enable_ansi=$enableval,enable_ansi=no)
option (DBUS_ENABLE_ANSI "enable -ansi -pedantic gcc flags" OFF)
if(DBUS_ENABLE_ANSI)
if(NOT MSVC)
@@ -254,14 +272,11 @@ if(DBUS_ENABLE_ANSI)
endif(NOT MSVC)
endif(DBUS_ENABLE_ANSI)
-#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)
option (DBUS_ENABLE_VERBOSE_MODE "support verbose debug mode" ON)
-#AC_ARG_ENABLE(checks, AS_HELP_STRING([--enable-checks],[include sanity checks on public API]),enable_checks=$enableval,enable_checks=yes)
option (DBUS_DISABLE_CHECKS "Disable public API sanity checking" OFF)
if(NOT MSVC)
- #AC_ARG_ENABLE(gcov, AS_HELP_STRING([--enable-gcov],[compile with coverage profiling instrumentation (gcc only)]),enable_gcov=$enableval,enable_gcov=no)
option (DBUS_GCOV_ENABLED "compile with coverage profiling instrumentation (gcc only)" OFF)
if(DBUS_GCOV_ENABLED)
add_definitions(-fprofile-arcs -ftest-coverage)
@@ -271,21 +286,27 @@ if(NOT MSVC)
endif(DBUS_GCOV_ENABLED)
endif(NOT MSVC)
-#AC_ARG_ENABLE(abstract-sockets, AS_HELP_STRING([--enable-abstract-sockets],[use abstract socket namespace (linux only)]),enable_abstract_sockets=$enableval,enable_abstract_sockets=auto)
-# -> moved before include(ConfigureChecks.cmake)
-
-#AC_ARG_ENABLE(selinux, AS_HELP_STRING([--enable-selinux],[build with SELinux support]),enable_selinux=$enableval,enable_selinux=auto)
-#selinux missing
-
-#AC_ARG_ENABLE(dnotify, AS_HELP_STRING([--enable-dnotify],[build with dnotify support (linux only)]),enable_dnotify=$enableval,enable_dnotify=auto)
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
- option (DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX "build with dnotify support (linux only)" ON) # add a check !
+ option (DBUS_BUS_ENABLE_INOTIFY "build with inotify support (linux only)" ON)
+ if(DBUS_BUS_ENABLE_INOTIFY)
+ check_include_file(sys/inotify.h HAVE_SYS_INOTIFY_H)
+ if(NOT HAVE_SYS_INOTIFY_H)
+ message(FATAL_ERROR "sys/inotify.h not found!")
+ endif(NOT HAVE_SYS_INOTIFY_H)
+ endif(DBUS_BUS_ENABLE_INOTIFY)
+elseif("${CMAKE_SYSTEM_NAME}" MATCHES ".*BSD")
+ option (DBUS_BUS_ENABLE_KQUEUE "build with kqueue support (FreeBSD only)" ON)
+ if(DBUS_BUS_ENABLE_KQUEUE)
+ # cmake check a header by compiling a test program with
+ # the header, sys/event.h needs stdint.h and sys/types.h
+ # to work.
+ check_include_files("stdint.h;sys/types.h;sys/event.h" HAVE_SYS_EVENT_H)
+ if(NOT HAVE_SYS_EVENT_H)
+ message(FATAL_ERROR "sys/event.h not found!")
+ endif(NOT HAVE_SYS_EVENT_H)
+ endif(DBUS_BUS_ENABLE_KQUEUE)
endif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
-#AC_ARG_ENABLE(kqueue, AS_HELP_STRING([--enable-kqueue],[build with kqueue support (FreeBSD only)]),enable_kqueue=$enableval,enable_kqueue=auto)
-#missing
-
-#AC_ARG_ENABLE(console-owner-file, AS_HELP_STRING([--enable-console-owner-file],[enable console owner file]),enable_console_owner_file=$enableval,enable_console_owner_file=auto)
STRING(TOUPPER ${CMAKE_SYSTEM_NAME} sysname)
if("${sysname}" MATCHES ".*SOLARIS.*")
option (HAVE_CONSOLE_OWNER_FILE "enable console owner file (solaris only)" ON)
@@ -294,31 +315,14 @@ if("${sysname}" MATCHES ".*SOLARIS.*")
endif(HAVE_CONSOLE_OWNER_FILE)
endif("${sysname}" MATCHES ".*SOLARIS.*")
-#AC_ARG_WITH(xml, AS_HELP_STRING([--with-xml=[libxml/expat]],[XML library to use]))
-if(NOT LIBXML2_FOUND AND NOT LIBEXPAT_FOUND)
- message(FATAL "Neither expat nor libxml2 found!")
-endif(NOT LIBXML2_FOUND AND NOT LIBEXPAT_FOUND)
-
-if(DBUS_USE_EXPAT)
- SET(XML_LIB "Expat")
- SET(XML_LIBRARY ${LIBEXPAT_LIBRARIES})
- SET(XML_INCLUDE_DIR ${LIBEXPAT_INCLUDE_DIR})
-else(DBUS_USE_EXPAT)
- SET(XML_LIB "LibXML2")
- SET(XML_LIBRARY ${LIBXML2_LIBRARIES})
- SET(XML_INCLUDE_DIR ${LIBXML2_INCLUDE_DIR})
-endif(DBUS_USE_EXPAT)
-
-
-#AC_ARG_WITH(init-scripts, AS_HELP_STRING([--with-init-scripts=[redhat]],[Style of init scripts to install]))
-#AC_ARG_WITH(session-socket-dir, AS_HELP_STRING([--with-session-socket-dir=[dirname]],[Where to put sockets for the per-login-session message bus]))
-#AC_ARG_WITH(test-socket-dir, AS_HELP_STRING([--with-test-socket-dir=[dirname]],[Where to put sockets for make check]))
-#AC_ARG_WITH(system-pid-file, AS_HELP_STRING([--with-system-pid-file=[pidfile]],[PID file for systemwide daemon]))
-#AC_ARG_WITH(system-socket, AS_HELP_STRING([--with-system-socket=[filename]],[UNIX domain socket for systemwide daemon]))
-#AC_ARG_WITH(console-auth-dir, AS_HELP_STRING([--with-console-auth-dir=[dirname]],[directory to check for console ownerhip]))
-#AC_ARG_WITH(console-owner-file, AS_HELP_STRING([--with-console-owner-file=[filename]],[file whose owner determines current console owner]))
-#AC_ARG_WITH(dbus_user, AS_HELP_STRING([--with-dbus-user=<user>],[User for running the DBUS daemon (messagebus)]))
-#AC_ARG_WITH(dbus_daemondir, AS_HELP_STRING([--with-dbus-daemondir=[dirname]],[Directory for installing the DBUS daemon]))
+if(NOT EXPAT_FOUND)
+ message(FATAL_ERROR "expat not found!")
+endif(NOT EXPAT_FOUND)
+
+SET(XML_LIB "Expat")
+SET(XML_LIBRARY ${EXPAT_LIBRARIES})
+SET(XML_INCLUDE_DIR ${EXPAT_INCLUDE_DIR})
+
# all missing or hardcoded for now
# 'hidden' ones
@@ -353,9 +357,8 @@ endif(X11_FOUND)
# test binary names
if (WIN32)
- # 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")
+ # follow Automake's naming convention so we can share .in files
+ set (EXEEXT ${CMAKE_EXECUTABLE_SUFFIX})
endif(WIN32)
if (MSVC_IDE)
@@ -390,7 +393,7 @@ endif (MSVC_IDE)
else (NOT $ENV{TMP} STREQUAL "")
if (WIN32)
#Should never happen, both TMP and TEMP seem always set on Windows
- message(FATAL "Could not determine a usable temporary directory")
+ message(FATAL_ERROR "Could not determine a usable temporary directory")
else(WIN32)
set (DBUS_SESSION_SOCKET_DIR /tmp)
endif(WIN32)
@@ -398,17 +401,6 @@ endif (MSVC_IDE)
endif (NOT $ENV{TEMP} STREQUAL "")
endif (NOT $ENV{TMPDIR} STREQUAL "")
-#AC_ARG_WITH(test-socket-dir, AS_HELP_STRING([--with-test-socket-dir=[dirname]],[Where to put sockets for make check]))
-
-#AC_ARG_WITH(system-pid-file, AS_HELP_STRING([--with-system-pid-file=[pidfile]],[PID file for systemwide daemon]))
-
-#if ! test -z "$with_system_pid_file"; then
-# DBUS_SYSTEM_PID_FILE=$with_system_pid_file
-#elif test x$operating_system = xredhat ; then
-# DBUS_SYSTEM_PID_FILE=${EXPANDED_LOCALSTATEDIR}/run/messagebus.pid
-#else
-# DBUS_SYSTEM_PID_FILE=${EXPANDED_LOCALSTATEDIR}/run/dbus/pid
-#fi
# TODO: fix redhet
if (WIN32)
# bus-test expects a non empty string
@@ -417,32 +409,35 @@ else (WIN32)
set (DBUS_SYSTEM_PID_FILE ${EXPANDED_LOCALSTATEDIR}/run/dbus/pid)
endif (WIN32)
-#AC_ARG_WITH(system-socket, AS_HELP_STRING([--with-system-socket=[filename]],[UNIX domain socket for systemwide daemon]))
-
-#AC_ARG_WITH(console-auth-dir, AS_HELP_STRING([--with-console-auth-dir=[dirname]],[directory to check for console ownerhip]))
-
if (WIN32)
set (DBUS_CONSOLE_AUTH_DIR "")
else (WIN32)
set (DBUS_CONSOLE_AUTH_DIR "/var/run/console/")
endif (WIN32)
-#AC_ARG_WITH(dbus_user, AS_HELP_STRING([--with-dbus-user=<user>],[User for running the DBUS daemon (messagebus)]))
-
set (DBUS_USER )
+# This won't work on Windows. It's not meant to - the system bus is
+# meaningless on Windows anyway.
+#
+# This has to be suitable for hard-coding in client libraries as well as
+# in the dbus-daemon's configuration, so it has to be valid to listen on
+# and also to connect to. If this ever changes, it'll need to be split into
+# two variables, one for the listening address and one for the connecting
+# address.
+set (DBUS_SYSTEM_BUS_DEFAULT_ADDRESS "unix:path=${EXPANDED_LOCALSTATEDIR}/run/dbus/system_bus_socket" CACHE STRING "system bus default address")
if (WIN32)
- set (DBUS_SYSTEM_BUS_DEFAULT_ADDRESS "nonce-tcp:" CACHE STRING "system bus default address")
- set (DBUS_SESSION_BUS_DEFAULT_ADDRESS "nonce-tcp:" CACHE STRING "session bus default address")
+ set (DBUS_SESSION_BUS_LISTEN_ADDRESS "autolaunch:" CACHE STRING "session bus default listening address")
+ set (DBUS_SESSION_BUS_CONNECT_ADDRESS "autolaunch:" CACHE STRING "session bus fallback address for clients")
set (DBUS_SYSTEM_CONFIG_FILE "etc/dbus-1/system.conf")
set (DBUS_SESSION_CONFIG_FILE "etc/dbus-1/session.conf")
# bus-test expects a non empty string
set (DBUS_USER "Administrator")
else (WIN32)
- set (DBUS_SYSTEM_BUS_DEFAULT_ADDRESS "unix:tmpdir=" CACHE STRING "system bus default address")
- set (DBUS_SESSION_BUS_DEFAULT_ADDRESS "unix:path=${DBUS_SESSION_SOCKET_DIR}" CACHE STRING "session bus default address")
+ set (DBUS_SESSION_BUS_LISTEN_ADDRESS "unix:tmpdir=${DBUS_SESSION_SOCKET_DIR}" CACHE STRING "session bus default listening address")
+ set (DBUS_SESSION_BUS_CONNECT_ADDRESS "autolaunch:" CACHE STRING "session bus fallback address for clients")
set (sysconfdir "")
set (configdir ${sysconfdir}/dbus-1 )
set (DBUS_SYSTEM_CONFIG_FILE ${configdir}/system.conf)
@@ -472,6 +467,7 @@ if (DBUS_BUILD_TESTS)
set(DBUS_TEST_DATA ${CMAKE_BINARY_DIR}/test/data)
set(TEST_SOCKET_DIR ${DBUS_SESSION_SOCKET_DIR} )
set(TEST_LAUNCH_HELPER_BINARY ${EXECUTABLE_OUTPUT_PATH}/dbus-daemon-launch-helper-test)
+ set(TEST_BUS_LAUNCH_BINARY ${EXECUTABLE_OUTPUT_PATH}/dbus-launch${EXEEXT})
if (UNIX)
set (TEST_LISTEN "unix:tmpdir=${TEST_SOCKET_DIR}")
endif (UNIX)
@@ -487,7 +483,9 @@ set(DBUS_INTERNAL_LIBRARIES dbus-internal)
# important note: DBUS_INTERNAL_xxxxx_DEFINITIONS must *not* be set when building dbus-1 library
set (DBUS_INTERNAL_ADD_LIBRARY_OPTIONS STATIC)
set (DBUS_INTERNAL_LIBRARY_DEFINITIONS "-DDBUS_STATIC_BUILD")
-set (DBUS_INTERNAL_CLIENT_DEFINITIONS "-DDBUS_STATIC_BUILD")
+# For now, the CMake build system doesn't support replacing the internal
+# main loop with dbus-glib
+set (DBUS_INTERNAL_CLIENT_DEFINITIONS "-DDBUS_STATIC_BUILD -DDBUS_COMPILATION -DDBUS_TEST_USE_INTERNAL")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h )
@@ -526,7 +524,6 @@ message(" install exec_prefix: ${exec_prefix} "
message(" install libdir: ${EXPANDED_LIBDIR} ")
message(" install bindir: ${EXPANDED_BINDIR} ")
message(" install sysconfdir: ${EXPANDED_SYSCONFDIR} ")
-#message(" install localstatedir: ${EXPANDED_LOCALSTATEDIR} ")
message(" install datadir: ${EXPANDED_DATADIR} ")
message(" source code location: ${DBUS_SOURCE_DIR} ")
message(" build dir: ${CMAKE_BINARY_DIR} ")
@@ -545,27 +542,24 @@ message(" Doxygen: ${DOXYGEN} "
message(" Docbook Generator: ${DOCBOOK_GENERATOR_NAME} ")
-#message(" Maintainer mode: ${USE_MAINTAINER_MODE} ")
message(" gcc coverage profiling: ${DBUS_GCOV_ENABLED} ")
message(" Building unit tests: ${DBUS_BUILD_TESTS} ")
+message(" Building with GLib: ${DBUS_WITH_GLIB} ")
message(" Building verbose mode: ${DBUS_ENABLE_VERBOSE_MODE} ")
-message(" Building w/o assertions: ${DBUS_DISABLE_ASSERTS} ")
+message(" Building w/o assertions: ${DBUS_DISABLE_ASSERT} ")
message(" Building w/o checks: ${DBUS_DISABLE_CHECKS} ")
message(" Building bus stats API: ${DBUS_ENABLE_STATS} ")
message(" installing system libs: ${DBUS_INSTALL_SYSTEM_LIBS} ")
-#message(" Building SELinux support: ${have_selinux} ")
-#message(" Building dnotify support: ${have_dnotify} ")
+message(" Building inotify support: ${DBUS_BUS_ENABLE_INOTIFY} ")
+message(" Building kqueue support: ${DBUS_BUS_ENABLE_KQUEUE} ")
message(" Building Doxygen docs: ${DBUS_ENABLE_DOXYGEN_DOCS} ")
message(" Building XML docs: ${DBUS_ENABLE_XML_DOCS} ")
-#message(" Gettext libs (empty OK): ${INTLLIBS} ")
-message(" Using XML parser: ${XML_LIB} ")
message(" Daemon executable name: ${DBUS_DAEMON_NAME}")
if (WIN32)
message(" System bus address: ${DBUS_SYSTEM_BUS_DEFAULT_ADDRESS} ")
-message(" Session bus address: ${DBUS_SESSION_BUS_DEFAULT_ADDRESS} ")
+message(" Session bus listens on: ${DBUS_SESSION_BUS_LISTEN_ADDRESS} ")
+message(" Session clients connect to: ${DBUS_SESSION_BUS_CONNECT_ADDRESS} ")
else (WIN32)
-#message(" Init scripts style: ${with_init_scripts} ")
-#message(" Abstract socket names: ${have_abstract_sockets} ")
message(" System bus socket: ${DBUS_SYSTEM_SOCKET} ")
message(" System bus address: ${DBUS_SYSTEM_BUS_DEFAULT_ADDRESS} ")
message(" System bus PID file: ${DBUS_SYSTEM_PID_FILE} ")
@@ -584,9 +578,9 @@ if (DBUS_BUILD_TESTS)
message("NOTE: building with unit tests increases the size of the installed library and renders it insecure.")
endif(DBUS_BUILD_TESTS)
-if (DBUS_BUILD_TESTS AND DBUS_DISABLE_ASSERTS)
+if (DBUS_BUILD_TESTS AND DBUS_DISABLE_ASSERT)
message("NOTE: building with unit tests but without assertions means tests may not properly report failures (this configuration is only useful when doing something like profiling the tests)")
-endif(DBUS_BUILD_TESTS AND DBUS_DISABLE_ASSERTS)
+endif(DBUS_BUILD_TESTS AND DBUS_DISABLE_ASSERT)
if (DBUS_GCOV_ENABLED)
message("NOTE: building with coverage profiling is definitely for developers only.")
@@ -596,13 +590,18 @@ if (DBUS_ENABLE_VERBOSE_MODE)
message("NOTE: building with verbose mode increases library size, may slightly increase security risk, and decreases performance.")
endif(DBUS_ENABLE_VERBOSE_MODE)
-if(NOT DBUS_DISABLE_ASSERTS)
+if(NOT DBUS_DISABLE_ASSERT)
message("NOTE: building with assertions increases library size and decreases performance.")
-endif(NOT DBUS_DISABLE_ASSERTS)
+endif(NOT DBUS_DISABLE_ASSERT)
if (DBUS_DISABLE_CHECKS)
message("NOTE: building without checks for arguments passed to public API makes it harder to debug apps using D-BUS, but will slightly decrease D-BUS library size and _very_ slightly improve performance.")
endif(DBUS_DISABLE_CHECKS)
+
+foreach(_note ${FOOTNOTES})
+ message(${_note})
+endforeach()
+
MESSAGE(" ")
INCLUDE(modules/CPackInstallConfig.cmake)
diff --git a/cmake/ConfigureChecks.cmake b/cmake/ConfigureChecks.cmake
index 33a9cee2..d290b0f2 100644
--- a/cmake/ConfigureChecks.cmake
+++ b/cmake/ConfigureChecks.cmake
@@ -11,7 +11,6 @@ check_include_file(sys/time.h HAVE_SYS_TIME_H)# dbus-sysdeps-win.c
check_include_file(sys/wait.h HAVE_SYS_WAIT_H)# dbus-sysdeps-win.c
check_include_file(time.h HAVE_TIME_H) # dbus-sysdeps-win.c
check_include_file(ws2tcpip.h HAVE_WS2TCPIP_H)# dbus-sysdeps-win.c
-check_include_file(wspiapi.h HAVE_WSPIAPI_H) # dbus-sysdeps-win.c
check_include_file(unistd.h HAVE_UNISTD_H) # dbus-sysdeps-util-win.c
check_include_file(stdio.h HAVE_STDIO_H) # dbus-sysdeps.h
check_include_file(sys/syslimits.h HAVE_SYS_SYSLIMITS_H) # dbus-sysdeps-unix.c
@@ -52,25 +51,23 @@ check_type_size("__int64" SIZEOF___INT64)
# DBUS_INT64_TYPE
if(SIZEOF_INT EQUAL 8)
- set (DBUS_HAVE_INT64 1)
set (DBUS_INT64_TYPE "int")
set (DBUS_INT64_CONSTANT "(val)")
set (DBUS_UINT64_CONSTANT "(val##U)")
elseif(SIZEOF_LONG EQUAL 8)
- set (DBUS_HAVE_INT64 1)
set (DBUS_INT64_TYPE "long")
set (DBUS_INT64_CONSTANT "(val##L)")
set (DBUS_UINT64_CONSTANT "(val##UL)")
elseif(SIZEOF_LONG_LONG EQUAL 8)
- set (DBUS_HAVE_INT64 1)
set (DBUS_INT64_TYPE "long long")
set (DBUS_INT64_CONSTANT "(val##LL)")
set (DBUS_UINT64_CONSTANT "(val##ULL)")
elseif(SIZEOF___INT64 EQUAL 8)
- set (DBUS_HAVE_INT64 1)
set (DBUS_INT64_TYPE "__int64")
set (DBUS_INT64_CONSTANT "(val##i64)")
set (DBUS_UINT64_CONSTANT "(val##ui64)")
+else(SIZEOF_INT EQUAL 8)
+ message (FATAL_ERROR "Could not find a 64-bit integer type")
endif(SIZEOF_INT EQUAL 8)
# DBUS_INT32_TYPE
@@ -93,7 +90,7 @@ find_program(DOXYGEN doxygen)
find_program(XMLTO xmlto)
if(MSVC)
- SET(DBUS_VA_COPY_FUNC "_DBUS_VA_COPY_ASSIGN";)
+ SET(DBUS_VA_COPY_FUNC "_DBUS_VA_COPY_ASSIGN")
else(MSVC)
write_file("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/cmake_try_compile.c" "#include <stdarg.h>
#include <stdlib.h>
diff --git a/cmake/Doxyfile.cmake b/cmake/Doxyfile.cmake
deleted file mode 100644
index e00984e7..00000000
--- a/cmake/Doxyfile.cmake
+++ /dev/null
@@ -1,182 +0,0 @@
-# Doxyfile 0.1
-
-#---------------------------------------------------------------------------
-# General configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME = D-Bus
-PROJECT_NUMBER = @VERSION@
-OUTPUT_DIRECTORY = api
-OUTPUT_LANGUAGE = English
-EXTRACT_ALL = NO
-EXTRACT_PRIVATE = NO
-EXTRACT_STATIC = NO
-HIDE_UNDOC_MEMBERS = NO
-HIDE_UNDOC_CLASSES = NO
-BRIEF_MEMBER_DESC = YES
-REPEAT_BRIEF = YES
-ALWAYS_DETAILED_SEC = NO
-FULL_PATH_NAMES = NO
-STRIP_FROM_PATH =
-INTERNAL_DOCS = NO
-STRIP_CODE_COMMENTS = YES
-CASE_SENSE_NAMES = YES
-SHORT_NAMES = NO
-HIDE_SCOPE_NAMES = NO
-VERBATIM_HEADERS = YES
-SHOW_INCLUDE_FILES = YES
-JAVADOC_AUTOBRIEF = YES
-INHERIT_DOCS = YES
-INLINE_INFO = YES
-SORT_MEMBER_DOCS = YES
-DISTRIBUTE_GROUP_DOC = NO
-TAB_SIZE = 8
-GENERATE_TODOLIST = YES
-GENERATE_TESTLIST = YES
-GENERATE_BUGLIST = YES
-ALIASES =
-ENABLED_SECTIONS =
-MAX_INITIALIZER_LINES = 30
-OPTIMIZE_OUTPUT_FOR_C = YES
-SHOW_USED_FILES = YES
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET = YES
-WARNINGS = YES
-WARN_IF_UNDOCUMENTED = YES
-WARN_FORMAT =
-WARN_LOGFILE =
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = @top_srcdir@/dbus
-FILE_PATTERNS = *.c *.h
-RECURSIVE = YES
-#EXCLUDE = test
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories.
-
-EXCLUDE_PATTERNS = Makefile.* ChangeLog CHANGES CHANGES.* README \
- README.* *.png AUTHORS DESIGN DESIGN.* *.desktop \
- DESKTOP* COMMENTS HOWTO magic NOTES TODO THANKS
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or
-# directories that contain example code fragments that are included (see
-# the \include command).
-
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = NO
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_SOURCE_FILES = NO
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER = YES
-INLINE_SOURCES = NO
-REFERENCED_BY_RELATION = YES
-REFERENCES_RELATION = YES
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX = NO
-COLS_IN_ALPHA_INDEX = 5
-IGNORE_PREFIX =
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-GENERATE_HTML = YES
-HTML_OUTPUT =
-HTML_HEADER =
-HTML_FOOTER =
-HTML_STYLESHEET =
-HTML_ALIGN_MEMBERS = YES
-GENERATE_HTMLHELP = NO
-GENERATE_CHI = NO
-BINARY_TOC = NO
-TOC_EXPAND = NO
-DISABLE_INDEX = NO
-ENUM_VALUES_PER_LINE = 4
-GENERATE_TREEVIEW = NO
-TREEVIEW_WIDTH = 250
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX = NO
-LATEX_OUTPUT =
-COMPACT_LATEX = NO
-PAPER_TYPE = a4wide
-EXTRA_PACKAGES =
-LATEX_HEADER =
-PDF_HYPERLINKS = NO
-USE_PDFLATEX = NO
-LATEX_BATCHMODE = NO
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-GENERATE_RTF = NO
-RTF_OUTPUT =
-COMPACT_RTF = NO
-RTF_HYPERLINKS = NO
-RTF_STYLESHEET_FILE =
-RTF_EXTENSIONS_FILE =
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN = YES
-MAN_OUTPUT = man
-MAN_EXTENSION = .3dbus
-MAN_LINKS = YES
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-GENERATE_XML = NO
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING = YES
-MACRO_EXPANSION = YES
-EXPAND_ONLY_PREDEF = YES
-SEARCH_INCLUDES = YES
-INCLUDE_PATH =
-INCLUDE_FILE_PATTERNS =
-PREDEFINED = "DBUS_BEGIN_DECLS=" \
- "DBUS_END_DECLS=" \
- "DOXYGEN_SHOULD_SKIP_THIS" \
- "DBUS_GNUC_DEPRECATED=" \
- "_DBUS_DEFINE_GLOBAL_LOCK(name)=" \
- "_DBUS_GNUC_PRINTF(from,to)=" \
- "DBUS_EXPORT="
-SKIP_FUNCTION_MACROS = YES
-#---------------------------------------------------------------------------
-# Configuration::addtions related to external references
-#---------------------------------------------------------------------------
-TAGFILES =
-GENERATE_TAGFILE =
-ALLEXTERNALS = NO
-PERL_PATH =
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-CLASS_DIAGRAMS = YES
-HAVE_DOT = NO
-CLASS_GRAPH = YES
-COLLABORATION_GRAPH = YES
-TEMPLATE_RELATIONS = YES
-HIDE_UNDOC_RELATIONS = YES
-INCLUDE_GRAPH = YES
-INCLUDED_BY_GRAPH = YES
-GRAPHICAL_HIERARCHY = YES
-DOT_PATH =
-DOTFILE_DIRS =
-MAX_DOT_GRAPH_WIDTH = 640
-MAX_DOT_GRAPH_HEIGHT = 1024
-GENERATE_LEGEND = YES
-DOT_CLEANUP = YES
-#---------------------------------------------------------------------------
-# Configuration::addtions related to the search engine
-#---------------------------------------------------------------------------
-SEARCHENGINE = NO
diff --git a/cmake/bus/CMakeLists.txt b/cmake/bus/CMakeLists.txt
index 2657605e..f5b41cd8 100644
--- a/cmake/bus/CMakeLists.txt
+++ b/cmake/bus/CMakeLists.txt
@@ -1,5 +1,3 @@
-project(bus)
-
add_definitions(-DDBUS_COMPILATION)
SET(EFENCE "")
@@ -29,15 +27,15 @@ FOREACH(FILE ${FILES})
configure_file(${FILE} ${TARGET} )
ENDFOREACH(FILE)
-if(DBUS_USE_EXPAT)
- SET (XML_SOURCES ${BUS_DIR}/config-loader-expat.c)
-else(DBUS_USE_EXPAT)
- SET (XML_SOURCES ${BUS_DIR}/config-loader-libxml.c)
-endif (DBUS_USE_EXPAT)
+SET (XML_SOURCES ${BUS_DIR}/config-loader-expat.c)
-# after next cvs update
-#set (DIR_WATCH_SOURCE ${BUS_DIR}/dir-watch-default.c)
-set (DIR_WATCH_SOURCE )
+if (DBUS_BUS_ENABLE_INOTIFY)
+ set (DIR_WATCH_SOURCE ${BUS_DIR}/dir-watch-inotify.c)
+elseif (DBUS_BUS_ENABLE_KQUEUE)
+ set (DIR_WATCH_SOURCE ${BUS_DIR}/dir-watch-kqueue.c)
+else (DBUS_BUS_ENABLE_INOTIFY)
+ set (DIR_WATCH_SOURCE ${BUS_DIR}/dir-watch-default.c)
+endif (DBUS_BUS_ENABLE_INOTIFY)
set (BUS_SOURCES
${BUS_DIR}/activation.c
@@ -46,14 +44,13 @@ set (BUS_SOURCES
${BUS_DIR}/bus.h
${BUS_DIR}/config-parser.c
${BUS_DIR}/config-parser.h
- ${BUS_DIR}/config-parser-common.c
- ${BUS_DIR}/config-parser-common.h
+ ${BUS_DIR}/config-parser-common.c
+ ${BUS_DIR}/config-parser-common.h
# ${BUS_DIR}/config-parser-trivial.c
${BUS_DIR}/connection.c
${BUS_DIR}/connection.h
${BUS_DIR}/desktop-file.c
${BUS_DIR}/desktop-file.h
- ${BUS_DIR}/dir-watch-default.c
${BUS_DIR}/dir-watch.h
${BUS_DIR}/dispatch.c
${BUS_DIR}/dispatch.h
@@ -81,7 +78,7 @@ if(DBUS_ENABLE_STATS)
${BUS_DIR}/stats.c
${BUS_DIR}/stats.h
)
-endif()
+endif(DBUS_ENABLE_STATS)
include_directories(${XML_INCLUDE_DIR})
@@ -108,12 +105,11 @@ if (DBUS_SERVICE)
install_targets(/bin dbus-service )
endif (DBUS_SERVICE)
-if (DBUS_BUILD_TESTS)
- add_executable(bus-test ${BUS_SOURCES} ${BUS_DIR}/test-main.c)
- target_link_libraries(bus-test ${DBUS_INTERNAL_LIBRARIES} ${XML_LIBRARY})
- set_target_properties(bus-test PROPERTIES COMPILE_FLAGS ${DBUS_INTERNAL_CLIENT_DEFINITIONS})
- add_test(bus-test ${EXECUTABLE_OUTPUT_PATH}/bus-test ${CMAKE_BINARY_DIR}/test/data)
-endif (DBUS_BUILD_TESTS)
+if (DBUS_ENABLE_EMBEDDED_TESTS)
+ set(SOURCES ${BUS_SOURCES} ${BUS_DIR}/test-main.c)
+ add_test_executable(test-bus "${SOURCES}" ${DBUS_INTERNAL_LIBRARIES} ${XML_LIBRARY})
+ set_target_properties(test-bus PROPERTIES COMPILE_FLAGS ${DBUS_INTERNAL_CLIENT_DEFINITIONS})
+endif (DBUS_ENABLE_EMBEDDED_TESTS)
if(MSVC)
project_source_group(${GROUP_CODE} bus_test_SOURCES dummy)
@@ -149,11 +145,9 @@ if(NOT WIN32)
set_target_properties(dbus-daemon-launch-helper-test PROPERTIES COMPILE_FLAGS "-DACTIVATION_LAUNCHER_TEST")
target_link_libraries(dbus-daemon-launch-helper-test ${DBUS_INTERNAL_LIBRARIES} ${XML_LIBRARY} )
- add_executable(bus-test-launch-helper ${LAUNCH_HELPER_SOURCES} ${BUS_DIR}/test-launch-helper.c)
- set_target_properties(bus-test-launch-helper PROPERTIES COMPILE_FLAGS "-DACTIVATION_LAUNCHER_TEST -DACTIVATION_LAUNCHER_DO_OOM")
- target_link_libraries(bus-test-launch-helper ${DBUS_INTERNAL_LIBRARIES} ${XML_LIBRARY} )
- add_test(bus-test-launch-helper ${EXECUTABLE_OUTPUT_PATH}/bus-test-launch-helper )
-
+ set (SOURCES ${LAUNCH_HELPER_SOURCES} ${BUS_DIR}/test-launch-helper.c)
+ add_test_executable(test-bus-launch-helper "${SOURCES}" ${DBUS_INTERNAL_LIBRARIES} ${XML_LIBRARY})
+ set_target_properties(test-bus-launch-helper PROPERTIES COMPILE_FLAGS "-DACTIVATION_LAUNCHER_TEST -DACTIVATION_LAUNCHER_DO_OOM")
endif(NOT WIN32)
#### Init scripts fun
diff --git a/cmake/bus/dbus-daemon.xml b/cmake/bus/dbus-daemon.xml
deleted file mode 100644
index f331699c..00000000
--- a/cmake/bus/dbus-daemon.xml
+++ /dev/null
@@ -1,752 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-<!-- lifted from troff+man by doclifter -->
-<refentry id='dbus-daemon'>
-<!-- -->
-<!-- dbus\-daemon manual page. -->
-<!-- Copyright (C) 2003 Red Hat, Inc. -->
-
-<refmeta>
-<refentrytitle>dbus-daemon</refentrytitle>
-<manvolnum>1</manvolnum>
-</refmeta>
-<refnamediv id='name'>
-<refname>dbus-daemon</refname>
-<refpurpose>Message bus daemon</refpurpose>
-</refnamediv>
-<!-- body begins here -->
-<refsynopsisdiv id='synopsis'>
-<cmdsynopsis>
- <command>dbus-daemon</command></cmdsynopsis>
-<cmdsynopsis>
- <command>dbus-daemon</command> <arg choice='opt'>--version </arg>
- <arg choice='opt'>--session </arg>
- <arg choice='opt'>--system </arg>
- <arg choice='opt'>--config-file=<replaceable>FILE</replaceable></arg>
- <arg choice='opt'><arg choice='plain'>--print-address </arg><arg choice='opt'><replaceable>=DESCRIPTOR</replaceable></arg></arg>
- <arg choice='opt'><arg choice='plain'>--print-pid </arg><arg choice='opt'><replaceable>=DESCRIPTOR</replaceable></arg></arg>
- <arg choice='opt'>--fork </arg>
- <sbr/>
-</cmdsynopsis>
-</refsynopsisdiv>
-
-
-<refsect1 id='description'><title>DESCRIPTION</title>
-<para><command>dbus-daemon</command> is the D-Bus message bus daemon. See
-<ulink url='http://www.freedesktop.org/software/dbus/'>http://www.freedesktop.org/software/dbus/</ulink> for more information about
-the big picture. D-Bus is first a library that provides one-to-one
-communication between any two applications; <command>dbus-daemon</command> is an
-application that uses this library to implement a message bus
-daemon. Multiple programs connect to the message bus daemon and can
-exchange messages with one another.</para>
-
-
-<para>There are two standard message bus instances: the systemwide message bus
-(installed on many systems as the "messagebus" init service) and the
-per-user-login-session message bus (started each time a user logs in).
-<command>dbus-daemon</command> is used for both of these instances, but with
-a different configuration file.</para>
-
-
-<para>The --session option is equivalent to
-"--config-file=/etc/dbus-1/session.conf" and the --system
-option is equivalent to
-"--config-file=/etc/dbus-1/system.conf". By creating
-additional configuration files and using the --config-file option,
-additional special-purpose message bus daemons could be created.</para>
-
-
-<para>The systemwide daemon is normally launched by an init script,
-standardly called simply "messagebus".</para>
-
-
-<para>The systemwide daemon is largely used for broadcasting system events,
-such as changes to the printer queue, or adding/removing devices.</para>
-
-
-<para>The per-session daemon is used for various interprocess communication
-among desktop applications (however, it is not tied to X or the GUI
-in any way).</para>
-
-
-<para>SIGHUP will cause the D-Bus daemon to PARTIALLY reload its
-configuration file and to flush its user/group information caches. Some
-configuration changes would require kicking all apps off the bus; so they will
-only take effect if you restart the daemon. Policy changes should take effect
-with SIGHUP.</para>
-
-</refsect1>
-
-<refsect1 id='options'><title>OPTIONS</title>
-<para>The following options are supported:</para>
-<variablelist remap='TP'>
- <varlistentry>
- <term><option>--config-file=FILE</option></term>
- <listitem>
-<para>Use the given configuration file.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>--fork</option></term>
- <listitem>
-<para>Force the message bus to fork and become a daemon, even if
-the configuration file does not specify that it should.
-In most contexts the configuration file already gets this
-right, though.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>--print-address[=DESCRIPTOR]</option></term>
- <listitem>
-<para>Print the address of the message bus to standard output, or
-to the given file descriptor. This is used by programs that
-launch the message bus.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>--print-pid[=DESCRIPTOR]</option></term>
- <listitem>
-<para>Print the process ID of the message bus to standard output, or
-to the given file descriptor. This is used by programs that
-launch the message bus.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>--session</option></term>
- <listitem>
-<para>Use the standard configuration file for the per-login-session message
-bus.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>--system</option></term>
- <listitem>
-<para>Use the standard configuration file for the systemwide message bus.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>--version</option></term>
- <listitem>
-<para>Print the version of the daemon.</para>
-
- </listitem>
- </varlistentry>
-</variablelist>
-</refsect1>
-
-<refsect1 id='configuration_file'><title>CONFIGURATION FILE</title>
-<para>A message bus daemon has a configuration file that specializes it
-for a particular application. For example, one configuration
-file might set up the message bus to be a systemwide message bus,
-while another might set it up to be a per-user-login-session bus.</para>
-
-
-<para>The configuration file also establishes resource limits, security
-parameters, and so forth.</para>
-
-
-<para>The configuration file is not part of any interoperability
-specification and its backward compatibility is not guaranteed; this
-document is documentation, not specification.</para>
-
-
-<para>The standard systemwide and per-session message bus setups are
-configured in the files "/etc/dbus-1/system.conf" and
-"/etc/dbus-1/session.conf". These files normally
-&lt;include&gt; a system-local.conf or session-local.conf; you can put local
-overrides in those files to avoid modifying the primary configuration
-files.</para>
-
-
-<para>The configuration file is an XML document. It must have the following
-doctype declaration:</para>
-<literallayout remap='.nf'>
-
- &lt;!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN"
- "<ulink url='http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd'>http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd</ulink>"&gt;
-
-</literallayout> <!-- .fi -->
-
-
-<para>The following elements may be present in the configuration file.</para>
-
-<variablelist remap='TP'>
- <varlistentry>
- <term><emphasis remap='I'>&lt;busconfig&gt;</emphasis></term>
- <listitem>
-<para></para>
- </listitem>
- </varlistentry>
-</variablelist>
-
-<para>Root element.</para>
-
-<variablelist remap='TP'>
- <varlistentry>
- <term><emphasis remap='I'>&lt;type&gt;</emphasis></term>
- <listitem>
-
-<para></para> <!-- FIXME: blank list item -->
- </listitem>
- </varlistentry>
-</variablelist>
-
-<para>The well-known type of the message bus. Currently known values are
-"system" and "session"; if other values are set, they should be
-either added to the D-Bus specification, or namespaced. The last
-&lt;type&gt; element "wins" (previous values are ignored).</para>
-
-
-<para>Example: &lt;type&gt;session&lt;/type&gt;</para>
-
-<variablelist remap='TP'>
- <varlistentry>
- <term><emphasis remap='I'>&lt;include&gt;</emphasis></term>
- <listitem>
-<para></para>
- </listitem>
- </varlistentry>
-</variablelist>
-
-<para>Include a file &lt;include&gt;filename.conf&lt;/include&gt; at this point. If the
-filename is relative, it is located relative to the configuration file
-doing the including.</para>
-
-
-<para>&lt;include&gt; has an optional attribute "ignore_missing=(yes|no)"
-which defaults to "no" if not provided. This attribute
-controls whether it's a fatal error for the included file
-to be absent.</para>
-
-<variablelist remap='TP'>
- <varlistentry>
- <term><emphasis remap='I'>&lt;includedir&gt;</emphasis></term>
- <listitem>
-
-<para></para> <!-- FIXME: blank list item -->
- </listitem>
- </varlistentry>
-</variablelist>
-
-<para>Include all files in &lt;includedir&gt;foo.d&lt;/includedir&gt; at this
-point. Files in the directory are included in undefined order.
-Only files ending in ".conf" are included.</para>
-
-
-<para>This is intended to allow extension of the system bus by particular
-packages. For example, if CUPS wants to be able to send out
-notification of printer queue changes, it could install a file to
-/etc/dbus-1/system.d that allowed all apps to receive
-this message and allowed the printer daemon user to send it.</para>
-
-<variablelist remap='TP'>
- <varlistentry>
- <term><emphasis remap='I'>&lt;user&gt;</emphasis></term>
- <listitem>
-
-<para></para> <!-- FIXME: blank list item -->
- </listitem>
- </varlistentry>
-</variablelist>
-
-<para>The user account the daemon should run as, as either a username or a
-UID. If the daemon cannot change to this UID on startup, it will exit.
-If this element is not present, the daemon will not change or care
-about its UID.</para>
-
-
-<para>The last &lt;user&gt; entry in the file "wins", the others are ignored.</para>
-
-
-<para>The user is changed after the bus has completed initialization. So
-sockets etc. will be created before changing user, but no data will be
-read from clients before changing user. This means that sockets
-and PID files can be created in a location that requires root
-privileges for writing.</para>
-
-<variablelist remap='TP'>
- <varlistentry>
- <term><emphasis remap='I'>&lt;fork&gt;</emphasis></term>
- <listitem>
-<para></para>
- </listitem>
- </varlistentry>
-</variablelist>
-
-<para>If present, the bus daemon becomes a real daemon (forks
-into the background, etc.). This is generally used
-rather than the --fork command line option.</para>
-
-<variablelist remap='TP'>
- <varlistentry>
- <term><emphasis remap='I'>&lt;listen&gt;</emphasis></term>
- <listitem>
-
-<para></para> <!-- FIXME: blank list item -->
- </listitem>
- </varlistentry>
-</variablelist>
-
-<para>Add an address that the bus should listen on. The
-address is in the standard D-Bus format that contains
-a transport name plus possible parameters/options.</para>
-
-
-<para>Example: &lt;listen&gt;unix:path=/tmp/foo&lt;/listen&gt;</para>
-
-
-<para>If there are multiple &lt;listen&gt; elements, then the bus listens
-on multiple addresses. The bus will pass its address to
-started services or other interested parties with
-the last address given in &lt;listen&gt; first. That is,
-apps will try to connect to the last &lt;listen&gt; address first.</para>
-
-<variablelist remap='TP'>
- <varlistentry>
- <term><emphasis remap='I'>&lt;auth&gt;</emphasis></term>
- <listitem>
-
-<para></para> <!-- FIXME: blank list item -->
- </listitem>
- </varlistentry>
-</variablelist>
-
-<para>Lists permitted authorization mechanisms. If this element doesn't
-exist, then all known mechanisms are allowed. If there are multiple
-&lt;auth&gt; elements, all the listed mechanisms are allowed. The order in
-which mechanisms are listed is not meaningful.</para>
-
-
-<para>Example: &lt;auth&gt;EXTERNAL&lt;/auth&gt;</para>
-
-
-<para>Example: &lt;auth&gt;DBUS_COOKIE_SHA1&lt;/auth&gt;</para>
-
-<variablelist remap='TP'>
- <varlistentry>
- <term><emphasis remap='I'>&lt;servicedir&gt;</emphasis></term>
- <listitem>
-
-<para></para> <!-- FIXME: blank list item -->
- </listitem>
- </varlistentry>
-</variablelist>
-
-<para>Adds a directory to scan for .service files. Directories are
-scanned starting with the last to appear in the config file
-(the first .service file found that provides a particular
-service will be used).</para>
-
-
-<para>Service files tell the bus how to automatically start a program.
-They are primarily used with the per-user-session bus,
-not the systemwide bus.</para>
-
-<variablelist remap='TP'>
- <varlistentry>
- <term><emphasis remap='I'>&lt;standard_session_servicedirs/&gt;</emphasis></term>
- <listitem>
-
-<para></para> <!-- FIXME: blank list item -->
- </listitem>
- </varlistentry>
-</variablelist>
-
-<para>&lt;standard_session_servicedirs/&gt; is equivalent to specifying a series
-of &lt;servicedir/&gt; elements for each of the data directories in the "XDG
-Base Directory Specification" with the subdirectory "dbus-1/services",
-so for example "/usr/share/dbus-1/services" would be among the
-directories searched.</para>
-
-
-<para>The "XDG Base Directory Specification" can be found at
-<ulink url='http://freedesktop.org/wiki/Standards/basedir-spec'>http://freedesktop.org/wiki/Standards/basedir-spec</ulink> if it hasn't moved,
-otherwise try your favorite search engine.</para>
-
-
-<para>The &lt;standard_session_servicedirs/&gt; option is only relevant to the
-per-user-session bus daemon defined in
-/etc/dbus-1/session.conf. Putting it in any other
-configuration file would probably be nonsense.</para>
-
-<variablelist remap='TP'>
- <varlistentry>
- <term><emphasis remap='I'>&lt;limit&gt;</emphasis></term>
- <listitem>
-
-<para></para> <!-- FIXME: blank list item -->
- </listitem>
- </varlistentry>
-</variablelist>
-
-<para>&lt;limit&gt; establishes a resource limit. For example:</para>
-<literallayout remap='.nf'>
- &lt;limit name="max_message_size"&gt;64&lt;/limit&gt;
- &lt;limit name="max_completed_connections"&gt;512&lt;/limit&gt;
-</literallayout> <!-- .fi -->
-
-
-<para>The name attribute is mandatory.
-Available limit names are:</para>
-<literallayout remap='.nf'>
- "max_incoming_bytes" : total size in bytes of messages
- incoming from a single connection
- "max_outgoing_bytes" : total size in bytes of messages
- queued up for a single connection
- "max_message_size" : max size of a single message in
- bytes
- "service_start_timeout" : milliseconds (thousandths) until
- a started service has to connect
- "auth_timeout" : milliseconds (thousandths) a
- connection is given to
- authenticate
- "max_completed_connections" : max number of authenticated connections
- "max_incomplete_connections" : max number of unauthenticated
- connections
- "max_connections_per_user" : max number of completed connections from
- the same user
- "max_pending_service_starts" : max number of service launches in
- progress at the same time
- "max_names_per_connection" : max number of names a single
- connection can own
- "max_match_rules_per_connection": max number of match rules for a single
- connection
- "max_replies_per_connection" : max number of pending method
- replies per connection
- (number of calls-in-progress)
- "reply_timeout" : milliseconds (thousandths)
- until a method call times out
-</literallayout> <!-- .fi -->
-
-
-<para>The max incoming/outgoing queue sizes allow a new message to be queued
-if one byte remains below the max. So you can in fact exceed the max
-by max_message_size.</para>
-
-
-<para>max_completed_connections divided by max_connections_per_user is the
-number of users that can work together to denial-of-service all other users by using
-up all connections on the systemwide bus.</para>
-
-
-<para>Limits are normally only of interest on the systemwide bus, not the user session
-buses.</para>
-
-<variablelist remap='TP'>
- <varlistentry>
- <term><emphasis remap='I'>&lt;policy&gt;</emphasis></term>
- <listitem>
-
-<para></para> <!-- FIXME: blank list item -->
- </listitem>
- </varlistentry>
-</variablelist>
-
-<para>The &lt;policy&gt; element defines a security policy to be applied to a particular
-set of connections to the bus. A policy is made up of
-&lt;allow&gt; and &lt;deny&gt; elements. Policies are normally used with the systemwide bus;
-they are analogous to a firewall in that they allow expected traffic
-and prevent unexpected traffic.</para>
-
-
-<para>The &lt;policy&gt; element has one of three attributes:</para>
-<literallayout remap='.nf'>
- context="(default|mandatory)"
- user="username or userid"
- group="group name or gid"
-</literallayout> <!-- .fi -->
-
-
-<para>
-Policies are applied to a connection as follows:</para>
-<literallayout remap='.nf'>
- - all context="default" policies are applied
- - all group="connection's user's group" policies are applied
- in undefined order
- - all user="connection's auth user" policies are applied
- in undefined order
- - all context="mandatory" policies are applied
-</literallayout> <!-- .fi -->
-
-
-<para>Policies applied later will override those applied earlier,
-when the policies overlap. Multiple policies with the same
-user/group/context are applied in the order they appear
-in the config file.</para>
-
-<variablelist remap='TP'>
- <varlistentry>
- <term><emphasis remap='I'>&lt;deny&gt;</emphasis></term>
- <listitem>
-<para><emphasis remap='I'>&lt;allow&gt;</emphasis></para>
-
- </listitem>
- </varlistentry>
-</variablelist>
-
-<para>A &lt;deny&gt; element appears below a &lt;policy&gt; element and prohibits some
-action. The &lt;allow&gt; element makes an exception to previous &lt;deny&gt;
-statements, and works just like &lt;deny&gt; but with the inverse meaning.</para>
-
-
-<para>The possible attributes of these elements are:</para>
-<literallayout remap='.nf'>
- send_interface="interface_name"
- send_member="method_or_signal_name"
- send_error="error_name"
- send_destination="name"
- send_type="method_call" | "method_return" | "signal" | "error"
- send_path="/path/name"
-
- receive_interface="interface_name"
- receive_member="method_or_signal_name"
- receive_error="error_name"
- receive_sender="name"
- receive_type="method_call" | "method_return" | "signal" | "error"
- receive_path="/path/name"
-
- send_requested_reply="true" | "false"
- receive_requested_reply="true" | "false"
-
- eavesdrop="true" | "false"
-
- own="name"
- own_prefix="name"
- user="username"
- group="groupname"
-</literallayout> <!-- .fi -->
-
-
-<para>Examples:</para>
-<literallayout remap='.nf'>
- &lt;deny send_interface="org.freedesktop.System" send_member="Reboot"/&gt;
- &lt;deny receive_interface="org.freedesktop.System" receive_member="Reboot"/&gt;
- &lt;deny own="org.freedesktop.System"/&gt;
- &lt;deny send_destination="org.freedesktop.System"/&gt;
- &lt;deny receive_sender="org.freedesktop.System"/&gt;
- &lt;deny user="john"/&gt;
- &lt;deny group="enemies"/&gt;
-</literallayout> <!-- .fi -->
-
-
-<para>The &lt;deny&gt; element's attributes determine whether the deny "matches" a
-particular action. If it matches, the action is denied (unless later
-rules in the config file allow it).</para>
-
-
-<para>send_destination and receive_sender rules mean that messages may not be
-sent to or received from the *owner* of the given name, not that
-they may not be sent *to that name*. That is, if a connection
-owns services A, B, C, and sending to A is denied, sending to B or C
-will not work either.</para>
-
-
-<para>The other send_* and receive_* attributes are purely textual/by-value
-matches against the given field in the message header.</para>
-
-
-<para>"Eavesdropping" occurs when an application receives a message that
-was explicitly addressed to a name the application does not own.
-Eavesdropping thus only applies to messages that are addressed to
-services (i.e. it does not apply to signals).</para>
-
-
-<para>For &lt;allow&gt;, eavesdrop="true" indicates that the rule matches even
-when eavesdropping. eavesdrop="false" is the default and means that
-the rule only allows messages to go to their specified recipient.
-For &lt;deny&gt;, eavesdrop="true" indicates that the rule matches
-only when eavesdropping. eavesdrop="false" is the default for &lt;deny&gt;
-also, but here it means that the rule applies always, even when
-not eavesdropping. The eavesdrop attribute can only be combined with
-receive rules (with receive_* attributes).</para>
-
-
-
-<para>The [send|receive]_requested_reply attribute works similarly to the eavesdrop
-attribute. It controls whether the &lt;deny&gt; or &lt;allow&gt; matches a reply
-that is expected (corresponds to a previous method call message).
-This attribute only makes sense for reply messages (errors and method
-returns), and is ignored for other message types.</para>
-
-
-<para>For &lt;allow&gt;, [send|receive]_requested_reply="true" is the default and indicates that
-only requested replies are allowed by the
-rule. [send|receive]_requested_reply="false" means that the rule allows any reply
-even if unexpected.</para>
-
-
-<para>For &lt;deny&gt;, [send|receive]_requested_reply="false" is the default but indicates that
-the rule matches only when the reply was not
-requested. [send|receive]_requested_reply="true" indicates that the rule applies
-always, regardless of pending reply state.</para>
-
-
-<para>user and group denials mean that the given user or group may
-not connect to the message bus.</para>
-
-
-<para>For "name", "username", "groupname", etc.
-the character "*" can be substituted, meaning "any." Complex globs
-like "foo.bar.*" aren't allowed for now because they'd be work to
-implement and maybe encourage sloppy security anyway.</para>
-
-<para>&lt;allow own_prefix="a.b"/&gt; allows you to own the name "a.b" or any
-name whose first dot-separated elements are "a.b": in particular,
-you can own "a.b.c" or "a.b.c.d", but not "a.bc" or "a.c".
-This is useful when services like Telepathy and ReserveDevice
-define a meaning for subtrees of well-known names, such as
-org.freedesktop.Telepathy.ConnectionManager.(anything)
-and org.freedesktop.ReserveDevice1.(anything).</para>
-
-<para>It does not make sense to deny a user or group inside a &lt;policy&gt;
-for a user or group; user/group denials can only be inside
-context="default" or context="mandatory" policies.</para>
-
-
-<para>A single &lt;deny&gt; rule may specify combinations of attributes such as
-send_destination and send_interface and send_type. In this case, the
-denial applies only if both attributes match the message being denied.
-e.g. &lt;deny send_interface="foo.bar" send_destination="foo.blah"/&gt; would
-deny messages with the given interface AND the given bus name.
-To get an OR effect you specify multiple &lt;deny&gt; rules.</para>
-
-
-<para>You can't include both send_ and receive_ attributes on the same
-rule, since "whether the message can be sent" and "whether it can be
-received" are evaluated separately.</para>
-
-
-<para>Be careful with send_interface/receive_interface, because the
-interface field in messages is optional.</para>
-
-<variablelist remap='TP'>
- <varlistentry>
- <term><emphasis remap='I'>&lt;selinux&gt;</emphasis></term>
- <listitem>
-
-<para></para> <!-- FIXME: blank list item -->
- </listitem>
- </varlistentry>
-</variablelist>
-
-<para>The &lt;selinux&gt; element contains settings related to Security Enhanced Linux.
-More details below.</para>
-
-<variablelist remap='TP'>
- <varlistentry>
- <term><emphasis remap='I'>&lt;associate&gt;</emphasis></term>
- <listitem>
-
-<para></para> <!-- FIXME: blank list item -->
- </listitem>
- </varlistentry>
-</variablelist>
-
-<para>An &lt;associate&gt; element appears below an &lt;selinux&gt; element and
-creates a mapping. Right now only one kind of association is possible:</para>
-<literallayout remap='.nf'>
- &lt;associate own="org.freedesktop.Foobar" context="foo_t"/&gt;
-</literallayout> <!-- .fi -->
-
-
-<para>This means that if a connection asks to own the name
-"org.freedesktop.Foobar" then the source context will be the context
-of the connection and the target context will be "foo_t" - see the
-short discussion of SELinux below.</para>
-
-
-<para>Note, the context here is the target context when requesting a name,
-NOT the context of the connection owning the name.</para>
-
-
-<para>There's currently no way to set a default for owning any name, if
-we add this syntax it will look like:</para>
-<literallayout remap='.nf'>
- &lt;associate own="*" context="foo_t"/&gt;
-</literallayout> <!-- .fi -->
-<para>If you find a reason this is useful, let the developers know.
-Right now the default will be the security context of the bus itself.</para>
-
-
-<para>If two &lt;associate&gt; elements specify the same name, the element
-appearing later in the configuration file will be used.</para>
-
-</refsect1>
-
-<refsect1 id='selinux'><title>SELinux</title>
-<para>See <ulink url='http://www.nsa.gov/selinux/'>http://www.nsa.gov/selinux/</ulink> for full details on SELinux. Some useful excerpts:</para>
-
-
-<para>Every subject (process) and object (e.g. file, socket, IPC object,
-etc) in the system is assigned a collection of security attributes,
-known as a security context. A security context contains all of the
-security attributes associated with a particular subject or object
-that are relevant to the security policy.</para>
-
-
-<para>In order to better encapsulate security contexts and to provide
-greater efficiency, the policy enforcement code of SELinux typically
-handles security identifiers (SIDs) rather than security contexts. A
-SID is an integer that is mapped by the security server to a security
-context at runtime.</para>
-
-
-<para>When a security decision is required, the policy enforcement code
-passes a pair of SIDs (typically the SID of a subject and the SID of
-an object, but sometimes a pair of subject SIDs or a pair of object
-SIDs), and an object security class to the security server. The object
-security class indicates the kind of object, e.g. a process, a regular
-file, a directory, a TCP socket, etc.</para>
-
-
-<para>Access decisions specify whether or not a permission is granted for a
-given pair of SIDs and class. Each object class has a set of
-associated permissions defined to control operations on objects with
-that class.</para>
-
-
-<para>D-Bus performs SELinux security checks in two places.</para>
-
-
-<para>First, any time a message is routed from one connection to another
-connection, the bus daemon will check permissions with the security context of
-the first connection as source, security context of the second connection
-as target, object class "dbus" and requested permission "send_msg".</para>
-
-
-<para>If a security context is not available for a connection
-(impossible when using UNIX domain sockets), then the target
-context used is the context of the bus daemon itself.
-There is currently no way to change this default, because we're
-assuming that only UNIX domain sockets will be used to
-connect to the systemwide bus. If this changes, we'll
-probably add a way to set the default connection context.</para>
-
-
-<para>Second, any time a connection asks to own a name,
-the bus daemon will check permissions with the security
-context of the connection as source, the security context specified
-for the name in the config file as target, object
-class "dbus" and requested permission "acquire_svc".</para>
-
-
-<para>The security context for a bus name is specified with the
-&lt;associate&gt; element described earlier in this document.
-If a name has no security context associated in the
-configuration file, the security context of the bus daemon
-itself will be used.</para>
-
-</refsect1>
-
-<refsect1 id='author'><title>AUTHOR</title>
-<para>See <ulink url='http://www.freedesktop.org/software/dbus/doc/AUTHORS'>http://www.freedesktop.org/software/dbus/doc/AUTHORS</ulink></para>
-
-</refsect1>
-
-<refsect1 id='bugs'><title>BUGS</title>
-<para>Please send bug reports to the D-Bus mailing list or bug tracker,
-see <ulink url='http://www.freedesktop.org/software/dbus/'>http://www.freedesktop.org/software/dbus/</ulink></para>
-</refsect1>
-</refentry>
-
diff --git a/cmake/config.h.cmake b/cmake/config.h.cmake
index 6221c190..729080f7 100644
--- a/cmake/config.h.cmake
+++ b/cmake/config.h.cmake
@@ -6,6 +6,12 @@
/* indicate that we are building with cmake */
#define DBUS_CMAKE 1
+@AUTOPACKAGE_CONFIG_H_TEMPLATE@
+
+/*
+ * Variables defined by AC_DEFINE in ../configure.ac
+ * should be placed in this file
+*/
#cmakedefine HAVE_GNUC_VARARGS 1
#cmakedefine DBUS_CONSOLE_AUTH_DIR "@DBUS_CONSOLE_AUTH_DIR@"
@@ -15,35 +21,30 @@
#cmakedefine DBUS_SESSION_CONFIG_FILE "@DBUS_SESSION_CONFIG_FILE@"
#cmakedefine DBUS_DAEMON_NAME "@DBUS_DAEMON_NAME@"
#cmakedefine DBUS_SYSTEM_BUS_DEFAULT_ADDRESS "@DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@"
+#cmakedefine DBUS_SESSION_BUS_CONNECT_ADDRESS "@DBUS_SESSION_BUS_CONNECT_ADDRESS@"
#cmakedefine DBUS_MACHINE_UUID_FILE "@DBUS_MACHINE_UUID_FILE@"
-#cmakedefine DBUS_SESSION_BUS_DEFAULT_ADDRESS "@DBUS_SESSION_BUS_DEFAULT_ADDRESS@"
#cmakedefine DBUS_DAEMONDIR "@DBUS_DAEMONDIR@"
-#cmakedefine PACKAGE "@PACKAGE@"
-/* Version number of package */
-#cmakedefine DBUS_MAJOR_VERSION @DBUS_MAJOR_VERSION@
-#cmakedefine DBUS_MINOR_VERSION @DBUS_MINOR_VERSION@
-#cmakedefine DBUS_MICRO_VERSION @DBUS_MICRO_VERSION@
-#cmakedefine DBUS_VERSION ((@DBUS_MAJOR_VERSION@ << 16) | (@DBUS_MINOR_VERSION@ << 8) | (@DBUS_MICRO_VERSION@))
-#cmakedefine DBUS_VERSION_STRING "@DBUS_VERSION_STRING@"
-#cmakedefine DBUS_ENABLE_STATS
-#define VERSION DBUS_VERSION_STRING
+#cmakedefine DBUS_ENABLE_STATS
#define TEST_LISTEN "@TEST_LISTEN@"
// test binaries
#define DBUS_TEST_EXEC "@DBUS_TEST_EXEC@"
#define DBUS_EXEEXT "@EXEEXT@"
-
-/* Full path to test file test/test-exit in builddir */
-#define TEST_BUS_BINARY "@TEST_BUS_BINARY@"
+#cmakedefine TEST_BUS_LAUNCH_BINARY "@TEST_BUS_LAUNCH_BINARY@"
/* Some dbus features */
-#cmakedefine DBUS_BUILD_TESTS 1
#cmakedefine DBUS_ENABLE_ANSI 1
#cmakedefine DBUS_ENABLE_VERBOSE_MODE 1
-#cmakedefine DBUS_DISABLE_ASSERTS 1
+#cmakedefine DBUS_DISABLE_ASSERT 1
+#ifndef DBUS_DISABLE_ASSERT
+# define DBUS_ENABLE_ASSERT 1
+#endif
#cmakedefine DBUS_DISABLE_CHECKS 1
+#ifndef DBUS_DISABLE_CHECKS
+# define DBUS_ENABLE_CHECKS 1
+#endif
/* xmldocs */
/* doxygen */
#cmakedefine DBUS_GCOV_ENABLED 1
@@ -63,7 +64,6 @@
#endif
/* selinux */
-#cmakedefine DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX 1
/* kqueue */
#cmakedefine HAVE_CONSOLE_OWNER_FILE 1
#define DBUS_CONSOLE_OWNER_FILE "@DBUS_CONSOLE_OWNER_FILE@"
@@ -120,9 +120,6 @@
/* Define to 1 if you have ws2tcpip.h */
#cmakedefine HAVE_WS2TCPIP_H
-/* Define to 1 if you have wspiapi.h */
-#cmakedefine HAVE_WSPIAPI_H 1
-
/* Define to 1 if you have unistd.h */
#cmakedefine HAVE_UNISTD_H 1
@@ -197,6 +194,8 @@
/* Define to 1 if you have struct cmsgred */
#cmakedefine HAVE_CMSGCRED 1
+#cmakedefine FD_SETSIZE @FD_SETSIZE@
+
// system type defines
#if defined(_WIN32) || defined(_WIN64) || defined (_WIN32_WCE)
# define DBUS_WIN
@@ -249,4 +248,8 @@
#define inline __inline
#endif
+#ifdef DBUS_WIN
+#define FD_SETSIZE @FD_SETSIZE@
+#endif
+
#endif // _DBUS_CONFIG_H
diff --git a/cmake/cross-compile.sh b/cmake/cross-compile.sh
deleted file mode 100755
index 49e66e50..00000000
--- a/cmake/cross-compile.sh
+++ /dev/null
@@ -1,110 +0,0 @@
-#!/bin/sh
-#
-# cross compile script for cmake
-#
-# initial written by Fridrich Strba
-# refactored to debian/lenny by Ralf Habacker
-#
-# reported to work at least on debian/lenny
-#
-
-if test -f /usr/bin/i686-pc-mingw32-gcc; then
- cross_cc=i686-pc-mingw32
-elif test -f /usr/bin/i586-mingw32msvc-gcc; then
- cross_cc=i586-mingw32msvc
-else
- echo "could not determine mingw cross compiler"
- exit 1
-fi
-
-if test -d ~/$cross_cc; then
- cross_root=~/$cross_cc
-elif test -d /usr/$cross_cc/sys-root/mingw; then
- cross_root=/usr/$cross_cc/sys-root/mingw
-elif test -d /usr/$cross_cc/lib; then
- cross_root=/usr/$cross_cc
-else
- echo "could not determine mingw cross compiler sdk"
- exit 1
-fi
-
-if ! TEMP=`mktemp --tmpdir -d dbus-cross-compile.XXXXXX`; then
- echo "mktemp failed, try with coreutils 6.10 or later?" >&2
- exit 1
-fi
-
-# make cmake happy
-export TEMP
-
-HOST_CC=gcc; export HOST_CC;
-
-if test -d $cross_root/lib/pkgconfig; then
- PKG_CONFIG_PATH="$cross_root/lib/pkgconfig:$cross_root/share/pkgconfig"; export PKG_CONFIG_PATH;
-fi
-
-if test -d "$MINGW32_CLASSPATH" || test -f "$cross_root/share/java/libgcj.jar"; then
- CLASSPATH="$CLASSPATH:${MINGW32_CLASSPATH:-$cross_root/share/java/libgcj.jar:$cross_root/share/java/libgcj-tools.jar}"; export CLASSPATH;
-fi
-
-_PREFIX="/usr/bin/$cross_cc-";
-for i in `ls -1 ${_PREFIX}* | grep -v 'gcc-'`; do
- x=`echo $i|sed "s,${_PREFIX},,"|sed "s,\.awk*,,"|tr "a-z+-" "A-ZX_"`;
- declare -x $x="$i" ; export $x;
-done;
-unset _PREFIX;
-
-CC="${MINGW32_CC:-$cross_cc-gcc}"; export CC;
-CFLAGS="${MINGW32_CFLAGS:--O2 -g -pipe -Wall -fexceptions -fno-omit-frame-pointer -fno-optimize-sibling-calls --param=ssp-buffer-size=4 -mms-bitfields}"; export CFLAGS;
-LDFLAGS="${MINGW32_LDFLAGS:--Wl,--exclude-libs=libintl.a -Wl,--exclude-libs=libiconv.a}"; export LDFLAGS;
-
-if [ -x "/usr/bin/$cross_cc-g++" ]; then
- CXX="${MINGW32_CXX:-$cross_cc-g++}"; export CXX;
- CXXFLAGS="${MINGW32_CXXFLAGS:--O2 -g -pipe -Wall -fexceptions -fno-omit-frame-pointer -fno-optimize-sibling-calls --param=ssp-buffer-size=4 -mms-bitfields}"; export CXXFLAGS;
-else
- CXX=; export CXX;
- ac_cv_prog_CXX=no; export ac_cv_prog_CXX;
- CXXFLAGS=; export CXXFLAGS;
-fi;
-for i in `ls $cross_root/bin/*|grep -- "-config$"` ; do
- x=`basename $i|tr "a-z+-" "A-ZX_"|sed "s,\.,,"`;
- declare -x $x="$i" ; export $x;
-done;
-unset x i ;
-
-if ! test -f "$cross_root/lib/libexpat.dll.a"; then
- (cd $TEMP && wget http://www.winkde.org/pub/kde/ports/win32/repository/win32libs/expat-2.0.1-bin.zip)
- (cd $TEMP && wget http://www.winkde.org/pub/kde/ports/win32/repository/win32libs/expat-2.0.1-lib.zip)
- (cd $cross_root && unzip -x $TMP/expat-2.0.1-bin.zip)
- (cd $cross_root && unzip -x $TMP/expat-2.0.1-lib.zip)
-fi
-
-if test -f "$cross_root/lib/libexpat.dll.a"; then
- xml_library=-DDBUS_USE_EXPAT=On -DLIBEXPAT_INCLUDE_DIR:PATH=$cross_root/include -DLIBEXPAT_LIBRARIES:PATH=$cross_root/lib/libexpat.dll.a
-else
- echo "could not find a cross compile xml libraray"
- exit 1
-fi
-
-cmake \
- -DCMAKE_SYSTEM_NAME="Windows" \
- -DCMAKE_VERBOSE_MAKEFILE=ON \
- -DCMAKE_INSTALL_PREFIX:PATH=$cross_root \
- -DCMAKE_INSTALL_LIBDIR:PATH=$cross_root/lib \
- -DINCLUDE_INSTALL_DIR:PATH=$cross_root/include \
- -DLIB_INSTALL_DIR:PATH=$cross_root/lib \
- -DSYSCONF_INSTALL_DIR:PATH=$cross_root/etc \
- -DSHARE_INSTALL_PREFIX:PATH=$cross_root/share \
- -DBUILD_SHARED_LIBS:BOOL=ON \
- -DCMAKE_C_COMPILER="/usr/bin/$cross_cc-gcc" \
- -DCMAKE_CXX_COMPILER="/usr/bin/$cross_cc-g++" \
- -DCMAKE_FIND_ROOT_PATH="$cross_root" \
- -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \
- -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
- -DCMAKE_CXX_COMPILER="/usr/bin/$cross_cc-g++" \
- -DCMAKE_FIND_ROOT_PATH="$cross_root" \
- -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \
- -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
- $xml_library \
- -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \
- $*
-
diff --git a/cmake/dbus-env.bat.cmake b/cmake/dbus-env.bat.cmake
index 85f70051..d859ce03 100644
--- a/cmake/dbus-env.bat.cmake
+++ b/cmake/dbus-env.bat.cmake
@@ -2,7 +2,7 @@
@echo off
:: session bus address
-set DBUS_SESSION_BUS_ADDRESS=@DBUS_SESSION_BUS_DEFAULT_ADDRESS@
+set DBUS_SESSION_BUS_ADDRESS=@DBUS_SESSION_BUS_CONNECT_ADDRESS@
:: system bus address
-set DBUS_SYSTEM_BUS_DEFAULT_ADDRESS=@DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@ \ No newline at end of file
+set DBUS_SYSTEM_BUS_DEFAULT_ADDRESS=@DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@
diff --git a/cmake/dbus/CMakeLists.txt b/cmake/dbus/CMakeLists.txt
index d09e63df..a5481b78 100644
--- a/cmake/dbus/CMakeLists.txt
+++ b/cmake/dbus/CMakeLists.txt
@@ -1,5 +1,3 @@
-project(dbus-lib)
-
SET(DBUS_DIR ${CMAKE_SOURCE_DIR}/../dbus)
configure_file(${DBUS_DIR}/dbus-arch-deps.h.in ${CMAKE_CURRENT_BINARY_DIR}/dbus-arch-deps.h )
@@ -149,6 +147,7 @@ set (DBUS_SHARED_HEADERS
### should be underscore-prefixed but don't really need
### to be unless they move to DBUS_SHARED_SOURCES later)
set (DBUS_UTIL_SOURCES
+ ${DBUS_DIR}/dbus-asv-util.c
${DBUS_DIR}/dbus-auth-script.c
${DBUS_DIR}/dbus-auth-util.c
${DBUS_DIR}/dbus-credentials-util.c
@@ -165,14 +164,15 @@ set (DBUS_UTIL_SOURCES
${DBUS_DIR}/dbus-sysdeps-util.c
)
-if (DBUS_BUILD_TESTS)
+if (DBUS_ENABLE_EMBEDDED_TESTS)
set (DBUS_UTIL_SOURCES
${DBUS_UTIL_SOURCES}
${DBUS_DIR}/dbus-test.c
)
-endif (DBUS_BUILD_TESTS)
+endif (DBUS_ENABLE_EMBEDDED_TESTS)
set (DBUS_UTIL_HEADERS
+ ${DBUS_DIR}/dbus-asv-util.h
${DBUS_DIR}/dbus-auth-script.h
${DBUS_DIR}/dbus-mainloop.h
${DBUS_DIR}/dbus-message-factory.h
@@ -186,6 +186,7 @@ set (DBUS_UTIL_HEADERS
if (WIN32)
set (DBUS_SHARED_SOURCES ${DBUS_SHARED_SOURCES}
${DBUS_DIR}/dbus-file-win.c
+ ${DBUS_DIR}/dbus-init-win.cpp
${DBUS_DIR}/dbus-sysdeps-win.c
${DBUS_DIR}/dbus-pipe-win.c
${DBUS_DIR}/dbus-sysdeps-thread-win.c
@@ -264,13 +265,13 @@ if(WIN32)
if(WINCE)
target_link_libraries(dbus-1 ws2)
else(WINCE)
- target_link_libraries(dbus-1 ws2_32 advapi32 netapi32)
+ target_link_libraries(dbus-1 ws2_32 advapi32 netapi32 iphlpapi)
endif(WINCE)
else(WIN32)
- target_link_libraries(dbus-1 ${CMAKE_THREAD_LIBS_INIT})
+ target_link_libraries(dbus-1 ${CMAKE_THREAD_LIBS_INIT} rt)
endif(WIN32)
-install_targets(/lib dbus-1 )
+install(TARGETS dbus-1 ${INSTALL_TARGETS_DEFAULT_ARGS})
install_files(/include/dbus FILES ${dbusinclude_HEADERS})
### Internal library, used for the daemon, tools and tests, compiled statically.
@@ -289,19 +290,16 @@ if(WIN32)
if(WINCE)
target_link_libraries(dbus-internal ws2)
else(WINCE)
- target_link_libraries(dbus-internal ws2_32 advapi32 netapi32)
+ target_link_libraries(dbus-internal ws2_32 advapi32 netapi32 iphlpapi)
endif(WINCE)
else(WIN32)
- target_link_libraries(dbus-internal ${CMAKE_THREAD_LIBS_INIT})
+ target_link_libraries(dbus-internal ${CMAKE_THREAD_LIBS_INIT} rt)
endif(WIN32)
-if (DBUS_BUILD_TESTS)
- set (TESTS_ENVIRONMENT "DBUS_TEST_DATA=${CMAKE_SOURCE_DIR}/test/data DBUS_TEST_HOMEDIR=${CMAKE_BUILD_DIR}/dbus")
- ADD_EXECUTABLE(dbus-test ${CMAKE_SOURCE_DIR}/../dbus/dbus-test-main.c)
- target_link_libraries(dbus-test ${DBUS_INTERNAL_LIBRARIES})
- add_test(dbus-test ${EXECUTABLE_OUTPUT_PATH}/dbus-test ${CMAKE_SOURCE_DIR}/../test/data)
- set_target_properties(dbus-test PROPERTIES COMPILE_FLAGS ${DBUS_INTERNAL_CLIENT_DEFINITIONS})
-ENDIF (DBUS_BUILD_TESTS)
+if (DBUS_ENABLE_EMBEDDED_TESTS)
+ add_test_executable(test-dbus ${CMAKE_SOURCE_DIR}/../dbus/dbus-test-main.c ${DBUS_INTERNAL_LIBRARIES})
+ set_target_properties(test-dbus PROPERTIES COMPILE_FLAGS ${DBUS_INTERNAL_CLIENT_DEFINITIONS})
+ENDIF (DBUS_ENABLE_EMBEDDED_TESTS)
if (UNIX)
# set version info
diff --git a/cmake/doc/CMakeLists.txt b/cmake/doc/CMakeLists.txt
index df6b587b..7fdfc219 100644
--- a/cmake/doc/CMakeLists.txt
+++ b/cmake/doc/CMakeLists.txt
@@ -6,9 +6,10 @@ endif(DOXYGEN_EXECUTABLE)
if (DBUS_ENABLE_DOXYGEN_DOCS)
set (top_srcdir ${CMAKE_SOURCE_DIR}/..)
- configure_file(${CMAKE_SOURCE_DIR}/Doxyfile.cmake ${CMAKE_BINARY_DIR}/Doxyfile )
+ configure_file(${CMAKE_SOURCE_DIR}/../Doxyfile.in ${CMAKE_BINARY_DIR}/Doxyfile )
add_custom_target(doc
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/Doxyfile
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
endif (DBUS_ENABLE_DOXYGEN_DOCS)
@@ -21,54 +22,72 @@ find_program(XMLTO_EXECUTABLE xmlto)
if (MEINPROC4_EXECUTABLE OR XMLTO_EXECUTABLE)
OPTION(DBUS_ENABLE_XML_DOCS "build XML documentation (requires xmlto or meinproc4)" ON)
+ ADD_CUSTOM_TARGET(xmldoc ALL)
endif (MEINPROC4_EXECUTABLE OR XMLTO_EXECUTABLE)
-if (MEINPROC4_EXECUTABLE)
+if (XMLTO_EXECUTABLE)
+ set (DOCBOOK_GENERATOR_NAME "xmlto" PARENT_SCOPE)
+ set(DBUS_XML_DOCS_ENABLED 1)
+ set(MEINPROC4_EXECUTABLE 0)
+ MESSAGE(STATUS "xmlto docbook generator found")
+ set(STYLESHEET_MAN "${DOCBOOKXSL_DIR}/manpages/docbook.xsl")
+ set(STYLESHEET_HTML "${DOCBOOKXSL_DIR}/html/docbook.xsl")
+
+elseif (MEINPROC4_EXECUTABLE)
set(DOCBOOK_GENERATOR_NAME "meinproc4" PARENT_SCOPE)
set(DBUS_XML_DOCS_ENABLED 1)
if(WIN32)
get_filename_component(_a ${MEINPROC4_EXECUTABLE} PATH)
get_filename_component(_meinproc_install_path ${_a} PATH)
+ set(STYLESHEET_HTML "${_meinproc_install_path}/share/apps/ksgmltools2/docbook/xsl/html/docbook.xsl")
else(WIN32)
- set(_meinproc_install_path ${CMAKE_INSTALL_PREFIX})
+ set(STYLESHEET_HTML file:///usr/share/kde4/apps/ksgmltools2/customization/kde-nochunk.xsl)
endif(WIN32)
- set(STYLESHEET "${_meinproc_install_path}/share/apps/ksgmltools2/docbook/xsl/html/docbook.xsl")
-endif (MEINPROC4_EXECUTABLE)
-
-
-if (XMLTO_EXECUTABLE)
- set (DOCBOOK_GENERATOR_NAME "xmlto" PARENT_SCOPE)
- set(DBUS_XML_DOCS_ENABLED 1)
- MESSAGE(STATUS "xmlto docbook generator found")
-endif (XMLTO_EXECUTABLE)
+endif ()
if (DBUS_ENABLE_XML_DOCS)
-macro (DOCBOOK _sources _options)
+macro (DOCBOOK _sources _format)
get_filename_component(_infile ${_sources} ABSOLUTE)
- get_filename_component(_basename ${_infile} NAME_WE)
- set(_outfile ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.html)
+ get_filename_component(_name ${_infile} NAME)
+ set(_deps ${CMAKE_SOURCE_DIR}/CMakeLists.txt ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt)
+
+ if (${_format} STREQUAL "man")
+ string(REPLACE ".xml" "" _outname ${_name})
+ set(STYLESHEET ${STYLESHEET_MAN})
+ else()
+ string(REPLACE ".xml" ".html" _outname ${_name})
+ set(STYLESHEET ${STYLESHEET_HTML})
+ endif ()
+ set(_outfile ${CMAKE_CURRENT_BINARY_DIR}/${_outname})
if (EXISTS ${_sources})
if (MEINPROC4_EXECUTABLE)
- ADD_CUSTOM_TARGET(${_basename}.html ALL
- ${MEINPROC4_EXECUTABLE} --stylesheet ${STYLESHEET} -o ${_outfile} ${_infile}
- DEPENDS ${_infile}
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${_outfile}
+ COMMAND ${MEINPROC4_EXECUTABLE} --stylesheet ${STYLESHEET} -o ${_outfile} ${_infile}
+ DEPENDS ${_infile} ${STYLESHEET} ${_deps}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
endif ()
if (XMLTO_EXECUTABLE)
- ADD_CUSTOM_TARGET(${_basename}.html ALL
- ${XMLTO_EXECUTABLE} -vv ${_options} ${_infile}
- DEPENDS ${_infile}
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${_outfile}
+ COMMAND ${XMLTO_EXECUTABLE} -vv ${_format} ${_infile}
+ DEPENDS ${_infile} ${_deps}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
endif ()
- install(FILES ${_outfile} DESTINATION share/doc/dbus)
+ if (${_format} STREQUAL "man")
+ install(FILES ${_outfile} DESTINATION share/man/man1)
+ else ()
+ install(FILES ${_outfile} DESTINATION share/doc/dbus)
+ endif ()
else ()
MESSAGE(STATUS "skipping xml doc generating for ${_infile}, file not found")
endif ()
-
+ ADD_CUSTOM_TARGET(${_outname} DEPENDS ${_outfile})
+ ADD_DEPENDENCIES(xmldoc ${_outname})
endmacro (DOCBOOK)
### copy tests to builddir so that generated tests and static tests
@@ -98,11 +117,26 @@ DOCBOOK(${CMAKE_SOURCE_DIR}/../doc/dbus-test-plan.xml html-nochunks)
DOCBOOK(${CMAKE_SOURCE_DIR}/../doc/dbus-tutorial.xml html-nochunks)
DOCBOOK(${CMAKE_SOURCE_DIR}/../doc/dbus-specification.xml html-nochunks)
DOCBOOK(${CMAKE_SOURCE_DIR}/../doc/dbus-faq.xml html-nochunks)
-DOCBOOK(${CMAKE_SOURCE_DIR}/bus/dbus-daemon.xml html-nochunks)
-DOCBOOK(${CMAKE_SOURCE_DIR}/tools/dbus-monitor.xml html-nochunks)
-DOCBOOK(${CMAKE_SOURCE_DIR}/tools/dbus-send.xml html-nochunks)
-DOCBOOK(${CMAKE_SOURCE_DIR}/tools/dbus-launch.xml html-nochunks)
-
+configure_file(${CMAKE_SOURCE_DIR}/../doc/dbus-cleanup-sockets.1.xml.in ${CMAKE_BINARY_DIR}/doc/dbus-cleanup-sockets.1.xml)
+configure_file(${CMAKE_SOURCE_DIR}/../doc/dbus-daemon.1.xml.in ${CMAKE_BINARY_DIR}/doc/dbus-daemon.1.xml)
+configure_file(${CMAKE_SOURCE_DIR}/../doc/dbus-launch.1.xml.in ${CMAKE_BINARY_DIR}/doc/dbus-launch.1.xml)
+configure_file(${CMAKE_SOURCE_DIR}/../doc/dbus-monitor.1.xml.in ${CMAKE_BINARY_DIR}/doc/dbus-monitor.1.xml)
+configure_file(${CMAKE_SOURCE_DIR}/../doc/dbus-send.1.xml.in ${CMAKE_BINARY_DIR}/doc/dbus-send.1.xml)
+configure_file(${CMAKE_SOURCE_DIR}/../doc/dbus-uuidgen.1.xml.in ${CMAKE_BINARY_DIR}/doc/dbus-uuidgen.1.xml)
+DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-cleanup-sockets.1.xml html-nochunks)
+DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-daemon.1.xml html-nochunks)
+DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-launch.1.xml html-nochunks)
+DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-monitor.1.xml html-nochunks)
+DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-send.1.xml html-nochunks)
+DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-uuidgen.1.xml html-nochunks)
+if (UNIX)
+ DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-daemon.1.xml man)
+ DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-monitor.1.xml man)
+ DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-send.1.xml man)
+ DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-launch.1.xml man)
+ DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-uuidgen.1.xml man)
+ DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-cleanup-sockets.1.xml man)
+endif()
#
# handle html index file
#
diff --git a/cmake/modules/COPYING-CMAKE-SCRIPTS b/cmake/modules/COPYING-CMAKE-SCRIPTS
new file mode 100644
index 00000000..53b6b71e
--- /dev/null
+++ b/cmake/modules/COPYING-CMAKE-SCRIPTS
@@ -0,0 +1,22 @@
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/cmake/modules/CPackInstallConfig.cmake b/cmake/modules/CPackInstallConfig.cmake
index f8073a25..74b66898 100644
--- a/cmake/modules/CPackInstallConfig.cmake
+++ b/cmake/modules/CPackInstallConfig.cmake
@@ -1,14 +1,7 @@
if (DBUS_INSTALL_SYSTEM_LIBS)
if (MINGW)
- if (DBUS_USE_EXPAT)
- # expat
- install_files(/bin FILES ${LIBEXPAT_LIBRARIES})
- else (DBUS_USE_EXPAT)
- # xml2
- install_files(/bin FILES ${LIBXML2_LIBRARIES})
- install_files(/bin FILES ${LIBICONV_LIBRARIES})
- endif (DBUS_USE_EXPAT)
+ install_files(/bin FILES ${LIBEXPAT_LIBRARIES})
else (MINGW)
INCLUDE(InstallRequiredSystemLibraries)
endif (MINGW)
diff --git a/cmake/modules/FindGLIB.cmake b/cmake/modules/FindGLIB.cmake
deleted file mode 100644
index 1fdaee95..00000000
--- a/cmake/modules/FindGLIB.cmake
+++ /dev/null
@@ -1,42 +0,0 @@
-# - Try to find the GLIB library
-# Once done this will define
-#
-# GLIB_FOUND - system has GLIB
-# GLIB_INCLUDES - the GLIB include directories
-# GLIB_LIBRARIES - The libraries needed to use GLIB
-
-if (WIN32)
-
-INCLUDE(MacroGetenvWinPath)
-
-MACRO_GETENV_WIN_PATH(_program_FILES_DIR PROGRAMFILES)
-
-FIND_PATH(GLIB_INCLUDE_DIR glib.h
- ${_program_FILES_DIR}/glib/include/glib-2.0
-)
-
-
-# search for GLIB in the default install directory for applications (default of (n)make install)
-FIND_LIBRARY(GLIB_LIBRARY NAMES glib-2.0
- PATHS
- ${_program_FILES_DIR}/glib/lib
-)
-
-if (GLIB_LIBRARY AND GLIB_INCLUDE_DIR)
- set(GLIB_FOUND TRUE)
- set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${GLIB_INCLUDES})
- set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${GLIB_LIBRARIES})
-
-endif (GLIB_LIBRARY AND GLIB_INCLUDE_DIR)
-
-if (GLIB_FOUND)
- if (NOT GLIB_FIND_QUIETLY)
- message(STATUS "Found GLIB: ${GLIB_LIBRARY}")
- endif (NOT GLIB_FIND_QUIETLY)
-else (GLIB_FOUND)
- if (GLIB_FIND_REQUIRED)
- message(FATAL_ERROR "Could NOT find GLIB library")
- endif (GLIB_FIND_REQUIRED)
-endif (GLIB_FOUND)
-
-endif (WIN32)
diff --git a/cmake/modules/FindGLib2.cmake b/cmake/modules/FindGLib2.cmake
new file mode 100644
index 00000000..d72b2a09
--- /dev/null
+++ b/cmake/modules/FindGLib2.cmake
@@ -0,0 +1,60 @@
+# - Try to find the GLIB2 libraries
+# Once done this will define
+#
+# GLIB2_FOUND - system has glib2
+# GLIB2_INCLUDE_DIR - the glib2 include directory
+# GLIB2_LIBRARIES - glib2 library
+
+# Copyright (c) 2008 Laurent Montel, <montel@kde.org>
+# Copyright (c) 2013 Ralf Habacker, <ralf.habacker@freenet.de>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+
+if(GLIB2_INCLUDE_DIR AND GLIB2_LIBRARIES)
+ # Already in cache, be silent
+ set(GLIB2_FIND_QUIETLY TRUE)
+endif(GLIB2_INCLUDE_DIR AND GLIB2_LIBRARIES)
+
+if (NOT WIN32)
+ find_package(PkgConfig)
+ pkg_check_modules(PC_LibGLIB2 QUIET glib-2.0)
+endif()
+
+find_path(GLIB2_MAIN_INCLUDE_DIR
+ NAMES glib.h
+ HINTS ${PC_LibGLIB2_INCLUDEDIR}
+ PATH_SUFFIXES glib-2.0)
+
+find_library(GLIB2_LIBRARY
+ NAMES glib-2.0
+ HINTS ${PC_LibGLIB2_LIBDIR}
+)
+
+find_library(GIO2_LIBRARY
+ NAMES gio-2.0
+ HINTS ${PC_LibGLIB2_LIBDIR}
+)
+
+set(GLIB2_LIBRARIES ${GLIB2_LIBRARY} ${GIO2_LIBRARY})
+
+# search the glibconfig.h include dir under the same root where the library is found
+get_filename_component(glib2LibDir "${GLIB2_LIBRARY}" PATH)
+
+find_path(GLIB2_INTERNAL_INCLUDE_DIR glibconfig.h
+ PATH_SUFFIXES glib-2.0/include
+ HINTS ${PC_LibGLIB2_INCLUDEDIR} "${glib2LibDir}" ${CMAKE_SYSTEM_LIBRARY_PATH})
+
+set(GLIB2_INCLUDE_DIR "${GLIB2_MAIN_INCLUDE_DIR}")
+
+# not sure if this include dir is optional or required
+# for now it is optional
+if(GLIB2_INTERNAL_INCLUDE_DIR)
+ set(GLIB2_INCLUDE_DIR ${GLIB2_INCLUDE_DIR} "${GLIB2_INTERNAL_INCLUDE_DIR}")
+endif(GLIB2_INTERNAL_INCLUDE_DIR)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(GLIB2 DEFAULT_MSG GLIB2_LIBRARIES GLIB2_MAIN_INCLUDE_DIR)
+
+mark_as_advanced(GLIB2_INCLUDE_DIR GLIB2_LIBRARIES)
diff --git a/cmake/modules/FindGObject.cmake b/cmake/modules/FindGObject.cmake
new file mode 100644
index 00000000..af0c9f73
--- /dev/null
+++ b/cmake/modules/FindGObject.cmake
@@ -0,0 +1,52 @@
+# - Try to find GObject
+# Once done this will define
+#
+# GOBJECT_FOUND - system has GObject
+# GOBJECT_INCLUDE_DIR - the GObject include directory
+# GOBJECT_LIBRARIES - the libraries needed to use GObject
+# GOBJECT_DEFINITIONS - Compiler switches required for using GObject
+
+# Copyright (c) 2011, Raphael Kubo da Costa <kubito@gmail.com>
+# Copyright (c) 2006, Tim Beaulen <tbscope@gmail.com>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+FIND_PACKAGE(PkgConfig)
+PKG_CHECK_MODULES(PC_GOBJECT gobject-2.0)
+SET(GOBJECT_DEFINITIONS ${PC_GOBJECT_CFLAGS_OTHER})
+
+FIND_PATH(GOBJECT_INCLUDE_DIR gobject.h
+ HINTS
+ ${PC_GOBJECT_INCLUDEDIR}
+ ${PC_GOBJECT_INCLUDE_DIRS}
+ PATH_SUFFIXES glib-2.0/gobject/
+ )
+
+FIND_LIBRARY(_GObjectLibs NAMES gobject-2.0
+ HINTS
+ ${PC_GOBJECT_LIBDIR}
+ ${PC_GOBJECT_LIBRARY_DIRS}
+ )
+FIND_LIBRARY(_GModuleLibs NAMES gmodule-2.0
+ HINTS
+ ${PC_GOBJECT_LIBDIR}
+ ${PC_GOBJECT_LIBRARY_DIRS}
+ )
+FIND_LIBRARY(_GThreadLibs NAMES gthread-2.0
+ HINTS
+ ${PC_GOBJECT_LIBDIR}
+ ${PC_GOBJECT_LIBRARY_DIRS}
+ )
+FIND_LIBRARY(_GLibs NAMES glib-2.0
+ HINTS
+ ${PC_GOBJECT_LIBDIR}
+ ${PC_GOBJECT_LIBRARY_DIRS}
+ )
+
+SET( GOBJECT_LIBRARIES ${_GObjectLibs} ${_GModuleLibs} ${_GThreadLibs} ${_GLibs} )
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(GOBJECT DEFAULT_MSG GOBJECT_LIBRARIES GOBJECT_INCLUDE_DIR)
+
+MARK_AS_ADVANCED(GOBJECT_INCLUDE_DIR _GObjectLibs _GModuleLibs _GThreadLibs _GLibs)
diff --git a/cmake/modules/FindLibExpat.cmake b/cmake/modules/FindLibExpat.cmake
deleted file mode 100644
index a07c8de4..00000000
--- a/cmake/modules/FindLibExpat.cmake
+++ /dev/null
@@ -1,61 +0,0 @@
-# - Try to find LIBEXPAT
-# Once done this will define
-#
-# LIBEXPAT_FOUND - system has LIBEXPAT
-# LIBEXPAT_INCLUDE_DIR - the LIBEXPAT include directory
-# LIBEXPAT_LIBRARIES - the libraries needed to use LIBEXPAT
-# LIBEXPAT_DEFINITIONS - Compiler switches required for using LIBEXPAT
-
-if (LIBEXPAT_INCLUDE_DIR AND LIBEXPAT_LIBRARIES)
-
- # in cache already
- SET(LIBEXPAT_FOUND TRUE)
-
-else (LIBEXPAT_INCLUDE_DIR AND LIBEXPAT_LIBRARIES)
-
- IF (WIN32)
- file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _progFiles)
- find_FILE(LIBEXPAT_DIR expat Source/lib/expat.h
- PATHS
- "${_progFiles}"
- )
- if (LIBEXPAT_DIR)
- set (_LIBEXPATIncDir ${LIBEXPAT_DIR}/Source/lib)
- set (_LIBEXPATLinkDir ${LIBEXPAT_DIR}/libs)
- endif (LIBEXPAT_DIR)
- ELSE (WIN32)
- # use pkg-config to get the directories and then use these values
- # in the FIND_PATH() and FIND_LIBRARY() calls
- INCLUDE(UsePkgConfig)
- PKGCONFIG(LIBEXPAT-2.0 _LIBEXPATIncDir _LIBEXPATLinkDir _LIBEXPATLinkFlags _LiIconvCflags)
- SET(LIBEXPAT_DEFINITIONS ${_LIBEXPATCflags})
- ENDIF (WIN32)
-
- FIND_PATH(LIBEXPAT_INCLUDE_DIR expat.h
- PATHS
- ${_LIBEXPATIncDir}
- PATH_SUFFIXES LIBEXPAT
- )
-
- FIND_LIBRARY(LIBEXPAT_LIBRARIES NAMES expat libexpat
- PATHS
- ${_LIBEXPATLinkDir}
- )
-
- if (LIBEXPAT_INCLUDE_DIR AND LIBEXPAT_LIBRARIES)
- set(LIBEXPAT_FOUND TRUE)
- endif (LIBEXPAT_INCLUDE_DIR AND LIBEXPAT_LIBRARIES)
-
- if (LIBEXPAT_FOUND)
- if (NOT LIBEXPAT_FIND_QUIETLY)
- message(STATUS "Found libexpat: ${LIBEXPAT_LIBRARIES}")
- endif (NOT LIBEXPAT_FIND_QUIETLY)
- else (LIBEXPAT_FOUND)
- if (LIBEXPAT_FIND_REQUIRED)
- message(SEND_ERROR "Could NOT find libexpat")
- endif (LIBEXPAT_FIND_REQUIRED)
- endif (LIBEXPAT_FOUND)
-
- MARK_AS_ADVANCED(LIBEXPAT_INCLUDE_DIR LIBEXPAT_LIBRARIES)
-
-endif (LIBEXPAT_INCLUDE_DIR AND LIBEXPAT_LIBRARIES)
diff --git a/cmake/modules/Macros.cmake b/cmake/modules/Macros.cmake
index b6371568..fd3f62c4 100644
--- a/cmake/modules/Macros.cmake
+++ b/cmake/modules/Macros.cmake
@@ -1,15 +1,62 @@
+if(DBUS_BUILD_TESTS AND CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_NAME STREQUAL "Windows")
+ if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
+ find_file(WINE_EXECUTABLE
+ NAMES wine
+ PATHS /usr/bin /usr/local/bin
+ NO_CMAKE_FIND_ROOT_PATH
+ )
+ find_file(HAVE_BINFMT_WINE_SUPPORT
+ NAMES DOSWin wine Wine windows Windows
+ PATHS /proc/sys/fs/binfmt_misc
+ NO_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH
+ )
+ if(WINE_EXECUTABLE AND HAVE_BINFMT_WINE_SUPPORT)
+ list(APPEND FOOTNOTES "NOTE: The requirements to run cross compiled applications on your host system are achieved. You may run 'make check'.")
+ endif()
+ if(NOT WINE_EXECUTABLE)
+ list(APPEND FOOTNOTES "NOTE: You may install the Windows emulator 'wine' to be able to run cross compiled test applications.")
+ endif()
+ if(NOT HAVE_BINFMT_WINE_SUPPORT)
+ list(APPEND FOOTNOTES "NOTE: You may activate binfmt_misc support for wine to be able to run cross compiled test applications.")
+ endif()
+ else()
+ list(APPEND FOOTNOTES "NOTE: You will not be able to run cross compiled applications on your host system.")
+ endif()
+endif()
MACRO(TIMESTAMP RESULT)
- IF(WIN32)
+ if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
EXECUTE_PROCESS(COMMAND "cmd" " /C date /T" OUTPUT_VARIABLE DATE)
string(REGEX REPLACE "(..)[/.](..)[/.](....).*" "\\3\\2\\1" DATE ${DATE})
EXECUTE_PROCESS(COMMAND "cmd" " /C time /T" OUTPUT_VARIABLE TIME)
string(REGEX REPLACE "(..):(..)" "\\1\\2" TIME ${TIME})
set (${RESULT} "${DATE}${TIME}")
- ELSEIF(UNIX)
+ else ()
EXECUTE_PROCESS(COMMAND "date" "+%Y%m%d%H%M" OUTPUT_VARIABLE ${RESULT})
- ELSE()
- MESSAGE(SEND_ERROR "date not implemented")
- SET(${RESULT} 000000000000)
- ENDIF()
+ endif ()
ENDMACRO()
+
+macro(add_test_executable _target _source)
+ add_executable(${_target} ${_source})
+ target_link_libraries(${_target} ${ARGN})
+ if (CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_NAME STREQUAL "Windows")
+ # run tests with binfmt_misc
+ set(PREFIX "z:")
+ set(_env "DBUS_TEST_DAEMON=${PREFIX}${CMAKE_BINARY_DIR}/bin/dbus-daemon${EXEEXT}")
+ add_test(NAME ${_target} COMMAND $<TARGET_FILE:${_target}>)
+ else()
+ set(PREFIX)
+ set(_env "DBUS_TEST_DAEMON=${CMAKE_BINARY_DIR}/bin/dbus-daemon${EXEEXT}")
+ add_test(NAME ${_target} COMMAND $<TARGET_FILE:${_target}>)
+ endif()
+ list(APPEND _env "DBUS_SESSION_BUS_ADDRESS=")
+ list(APPEND _env "DBUS_FATAL_WARNINGS=1")
+ list(APPEND _env "DBUS_TEST_DATA=${PREFIX}${CMAKE_BINARY_DIR}/test/data")
+ list(APPEND _env "DBUS_TEST_HOMEDIR=${PREFIX}${CMAKE_BINARY_DIR}/dbus")
+ set_tests_properties(${_target} PROPERTIES ENVIRONMENT "${_env}")
+endmacro(add_test_executable)
+
+macro(add_helper_executable _target _source)
+ add_executable(${_target} ${_source})
+ target_link_libraries(${_target} ${ARGN})
+endmacro(add_helper_executable)
diff --git a/cmake/modules/MacrosAutotools.cmake b/cmake/modules/MacrosAutotools.cmake
index ff30eaf9..68e8ae51 100644
--- a/cmake/modules/MacrosAutotools.cmake
+++ b/cmake/modules/MacrosAutotools.cmake
@@ -23,6 +23,66 @@ macro(autoversion config prefix)
endmacro()
#
+# Defines package related variables (PACKAGE_..., PACKAGE and VERSION)
+# as done by autotools.
+#
+# Additional it defines a cmake variable named PACKAGE_CONFIG_H_TEMPLATE
+# which could be placed in config.h templates to have those variables
+# defined at code level like shown below:
+#
+# config.h.template
+# ...
+# @AUTOPACKAGE_CONFIG_H_TEMPLATE@
+# ...
+#
+macro(autopackage name version url support_url)
+ # Define to the full name of this package.
+ set(PACKAGE_NAME ${name})
+
+ # Define to the version of this package.
+ set(PACKAGE_VERSION ${version})
+
+ # Define to the home page for this package.
+ set(PACKAGE_URL ${url})
+
+ # Define to the address where bug reports for this package should be sent.
+ set(PACKAGE_BUGREPORT ${support_url})
+
+ # Define to the full name and version of this package.
+ set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
+
+ # Define to the one symbol short name of this package.
+ set(PACKAGE_TARNAME ${PACKAGE_NAME})
+
+ set(PACKAGE ${name})
+ set(VERSION ${DBUS_VERSION_STRING})
+
+ set(AUTOPACKAGE_CONFIG_H_TEMPLATE "/* generated by cmake macro autopackage */\n
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT \"@PACKAGE_BUGREPORT@\"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME \"@PACKAGE_NAME@\"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING \"@PACKAGE_STRING@\"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME \"@PACKAGE_TARNAME@\"
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL \"@PACKAGE_URL@\"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION \"@PACKAGE_VERSION@\"
+
+/* defined by autotools package */
+#define PACKAGE \"@PACKAGE@\"
+#define VERSION \"@VERSION@\"
+")
+endmacro(autopackage)
+
+#
# parses config.h template and create cmake equivalent
# not implemented yet
#
diff --git a/cmake/test/CMakeLists.txt b/cmake/test/CMakeLists.txt
index 8657e4c7..ecad3046 100644
--- a/cmake/test/CMakeLists.txt
+++ b/cmake/test/CMakeLists.txt
@@ -1,7 +1,9 @@
-project(test)
+include_directories(${CMAKE_SOURCE_DIR}/../test)
add_definitions(${DBUS_INTERNAL_CLIENT_DEFINITIONS})
+set(DBUS_SESSION_BUS_LISTEN_ADDRESS ${TEST_LISTEN})
+
add_library(dbus-testutils STATIC
${CMAKE_SOURCE_DIR}/../test/test-utils.h
${CMAKE_SOURCE_DIR}/../test/test-utils.c
@@ -26,11 +28,11 @@ set (test-shell-service_SOURCES
${CMAKE_SOURCE_DIR}/../test/test-shell-service.c
)
-set (shell-test_SOURCES
+set (test-shell_SOURCES
${CMAKE_SOURCE_DIR}/../test/shell-test.c
)
-set (spawn-test_SOURCES
+set (test-spawn_SOURCES
${CMAKE_SOURCE_DIR}/../test/spawn-test.c
)
@@ -46,30 +48,39 @@ set (test-sleep-forever_SOURCES
${CMAKE_SOURCE_DIR}/../test/test-sleep-forever.c
)
-add_executable(test-service ${test-service_SOURCES})
-target_link_libraries(test-service dbus-testutils)
-
-add_executable(test-names ${test-names_SOURCES})
-target_link_libraries(test-names dbus-testutils)
-
-add_executable(shell-test ${shell-test_SOURCES})
-target_link_libraries(shell-test ${DBUS_INTERNAL_LIBRARIES})
-ADD_TEST(shell-test ${EXECUTABLE_OUTPUT_PATH}/shell-test${EXEEXT})
-
-add_executable(test-shell-service ${test-shell-service_SOURCES})
-target_link_libraries(test-shell-service dbus-testutils)
-
-add_executable(spawn-test ${spawn-test_SOURCES})
-target_link_libraries(spawn-test ${DBUS_INTERNAL_LIBRARIES})
-
-add_executable(test-exit ${test-exit_SOURCES})
-target_link_libraries(test-exit ${DBUS_INTERNAL_LIBRARIES})
-
-add_executable(test-segfault ${test-segfault_SOURCES})
-target_link_libraries(test-segfault ${DBUS_INTERNAL_LIBRARIES})
-
-add_executable(test-sleep-forever ${test-sleep-forever_SOURCES})
-target_link_libraries(test-sleep-forever ${DBUS_INTERNAL_LIBRARIES})
+add_helper_executable(test-service ${test-service_SOURCES} dbus-testutils)
+add_helper_executable(test-names ${test-names_SOURCES} dbus-testutils)
+add_test_executable(test-shell ${test-shell_SOURCES} ${DBUS_INTERNAL_LIBRARIES})
+add_test_executable(test-printf ${CMAKE_SOURCE_DIR}/../test/internals/printf.c dbus-testutils)
+add_helper_executable(test-shell-service ${test-shell-service_SOURCES} dbus-testutils)
+add_helper_executable(test-spawn ${test-spawn_SOURCES} ${DBUS_INTERNAL_LIBRARIES})
+add_helper_executable(test-exit ${test-exit_SOURCES} ${DBUS_INTERNAL_LIBRARIES})
+add_helper_executable(test-segfault ${test-segfault_SOURCES} ${DBUS_INTERNAL_LIBRARIES})
+add_helper_executable(test-sleep-forever ${test-sleep-forever_SOURCES} ${DBUS_INTERNAL_LIBRARIES})
+
+if(DBUS_WITH_GLIB)
+ message(STATUS "with glib test apps")
+ add_definitions(
+ ${GLIB2_DEFINITIONS}
+ ${GOBJECT_DEFINITIONS}
+ )
+ include_directories(
+ ${GLIB2_INCLUDE_DIR}
+ ${GOBJECT_INCLUDE_DIR}
+ )
+ set(TEST_LIBRARIES ${DBUS_INTERNAL_LIBRARIES} dbus-testutils ${GLIB2_LIBRARIES} ${GOBJECT_LIBRARIES})
+
+ add_test_executable(test-corrupt ${CMAKE_SOURCE_DIR}/../test/corrupt.c ${TEST_LIBRARIES})
+ add_test_executable(test-dbus-daemon ${CMAKE_SOURCE_DIR}/../test/dbus-daemon.c ${TEST_LIBRARIES})
+ add_test_executable(test-dbus-daemon-eavesdrop ${CMAKE_SOURCE_DIR}/../test/dbus-daemon-eavesdrop.c ${TEST_LIBRARIES})
+ add_test_executable(test-loopback ${CMAKE_SOURCE_DIR}/../test/loopback.c ${TEST_LIBRARIES})
+ add_test_executable(test-marshal ${CMAKE_SOURCE_DIR}/../test/marshal.c ${TEST_LIBRARIES})
+ add_test_executable(test-refs ${CMAKE_SOURCE_DIR}/../test/internals/refs.c ${TEST_LIBRARIES})
+ add_test_executable(test-relay ${CMAKE_SOURCE_DIR}/../test/relay.c ${TEST_LIBRARIES})
+ add_test_executable(test-syntax ${CMAKE_SOURCE_DIR}/../test/syntax.c ${TEST_LIBRARIES})
+ add_test_executable(test-syslog ${CMAKE_SOURCE_DIR}/../test/internals/syslog.c ${TEST_LIBRARIES})
+ add_helper_executable(manual-authz ${CMAKE_SOURCE_DIR}/../test/manual-authz.c ${TEST_LIBRARIES})
+endif()
### keep these in creation order, i.e. uppermost dirs first
set (TESTDIRS
@@ -81,6 +92,7 @@ set (TESTDIRS
test/data/sha-1
test/data/valid-config-files
test/data/valid-config-files/basic.d
+ test/data/valid-config-files/session.d
test/data/valid-config-files/system.d
test/data/valid-config-files-system
test/data/valid-introspection-files
@@ -139,17 +151,18 @@ ENDFOREACH(FILE_TYPE)
MESSAGE(STATUS "Copying generated bus config files to test directory")
set (OUTDIR ${CMAKE_BINARY_DIR}/test/data/valid-config-files)
-FILE(GLOB FILES "${CMAKE_BINARY_DIR}/bus/*.conf" )
+FILE(GLOB FILES "${CMAKE_SOURCE_DIR}/../bus/*.conf.in" )
FILE(MAKE_DIRECTORY ${OUTDIR})
FOREACH(FILE ${FILES})
GET_FILENAME_COMPONENT(FILENAME ${FILE} NAME)
+ STRING(REGEX REPLACE "\\.in$" "" FILENAME ${FILENAME})
SET (TARGET ${OUTDIR}/${FILENAME})
- configure_file(${FILE} ${TARGET} COPYONLY)
+ configure_file(${FILE} ${TARGET} @ONLY)
IF (CONFIG_VERBOSE)
MESSAGE("FROM: ${FILE}\nTO: ${TARGET}\n")
ENDIF (CONFIG_VERBOSE)
ENDFOREACH(FILE)
-# todo: for installation the TEST_..._BINARY variables must reflect the
-# installation dir or has to be defined relative
-#
+add_custom_target(check
+ COMMAND ctest -R ^test-.*
+)
diff --git a/cmake/test/name-test/CMakeLists.txt b/cmake/test/name-test/CMakeLists.txt
index 80b9908b..befb28f9 100644
--- a/cmake/test/name-test/CMakeLists.txt
+++ b/cmake/test/name-test/CMakeLists.txt
@@ -1,39 +1,15 @@
-if (DBUS_BUILD_TESTS)
+if (DBUS_ENABLE_EMBEDDED_TESTS)
set (NAMEtest-DIR ../../../test/name-test)
-add_definitions(-DDBUS_COMPILATION)
-
-add_executable(test-pending-call-dispatch ${NAMEtest-DIR}/test-pending-call-dispatch.c)
-target_link_libraries(test-pending-call-dispatch ${DBUS_INTERNAL_LIBRARIES})
-ADD_TEST(test-pending-call-dispatch ${EXECUTABLE_OUTPUT_PATH}/test-pending-call-dispatch)
-
-add_executable(test-pending-call-timeout ${NAMEtest-DIR}/test-pending-call-timeout.c)
-target_link_libraries(test-pending-call-timeout ${DBUS_INTERNAL_LIBRARIES})
-ADD_TEST(test-pending-call-timeout ${EXECUTABLE_OUTPUT_PATH}/test-pending-call-timeout)
-
-add_executable(test-thread-init ${NAMEtest-DIR}/test-threads-init.c)
-target_link_libraries(test-thread-init ${DBUS_INTERNAL_LIBRARIES})
-ADD_TEST(test-thread-init ${EXECUTABLE_OUTPUT_PATH}/test-thread-init)
-
-add_executable(test-ids ${NAMEtest-DIR}/test-ids.c)
-target_link_libraries(test-ids ${DBUS_INTERNAL_LIBRARIES})
-ADD_TEST(test-ids ${EXECUTABLE_OUTPUT_PATH}/test-ids)
-
-add_executable(test-shutdown ${NAMEtest-DIR}/test-shutdown.c)
-target_link_libraries(test-shutdown dbus-testutils)
-ADD_TEST(test-shutdown ${EXECUTABLE_OUTPUT_PATH}/test-shutdown)
-
-add_executable(test-privserver ${NAMEtest-DIR}/test-privserver.c)
-target_link_libraries(test-privserver dbus-testutils)
-ADD_TEST(test-privserver ${EXECUTABLE_OUTPUT_PATH}/test-privserver)
-
-add_executable(test-privserver-client ${NAMEtest-DIR}/test-privserver-client.c)
-target_link_libraries(test-privserver-client dbus-testutils)
-ADD_TEST(test-privserver-client ${EXECUTABLE_OUTPUT_PATH}/test-privserver-client)
-
-add_executable(test-autolaunch ${NAMEtest-DIR}/test-autolaunch.c)
-target_link_libraries(test-autolaunch dbus-testutils)
-ADD_TEST(test-autolaunch ${EXECUTABLE_OUTPUT_PATH}/test-autolaunch)
-
-endif (DBUS_BUILD_TESTS)
+add_definitions(${DBUS_INTERNAL_CLIENT_DEFINITIONS})
+
+add_helper_executable(test-pending-call-dispatch ${NAMEtest-DIR}/test-pending-call-dispatch.c ${DBUS_INTERNAL_LIBRARIES})
+add_helper_executable(test-pending-call-timeout ${NAMEtest-DIR}/test-pending-call-timeout.c ${DBUS_INTERNAL_LIBRARIES})
+add_helper_executable(test-thread-init ${NAMEtest-DIR}/test-threads-init.c ${DBUS_INTERNAL_LIBRARIES})
+add_helper_executable(test-ids ${NAMEtest-DIR}/test-ids.c ${DBUS_INTERNAL_LIBRARIES})
+add_helper_executable(test-shutdown ${NAMEtest-DIR}/test-shutdown.c dbus-testutils)
+add_helper_executable(test-privserver ${NAMEtest-DIR}/test-privserver.c dbus-testutils)
+add_helper_executable(test-privserver-client ${NAMEtest-DIR}/test-privserver-client.c dbus-testutils)
+add_helper_executable(test-autolaunch ${NAMEtest-DIR}/test-autolaunch.c dbus-testutils)
+endif (DBUS_ENABLE_EMBEDDED_TESTS)
diff --git a/cmake/tools/CMakeLists.txt b/cmake/tools/CMakeLists.txt
index 101c7e60..ddbd5bcf 100644
--- a/cmake/tools/CMakeLists.txt
+++ b/cmake/tools/CMakeLists.txt
@@ -1,5 +1,3 @@
-project(tools)
-
set (dbus_send_SOURCES
../../tools/dbus-print-message.c
../../tools/dbus-print-message.h
diff --git a/cmake/tools/dbus-launch.xml b/cmake/tools/dbus-launch.xml
deleted file mode 100644
index dc34898f..00000000
--- a/cmake/tools/dbus-launch.xml
+++ /dev/null
@@ -1,240 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-<!-- lifted from troff+man by doclifter -->
-<refentry id='dbuslaunch1'>
-<!-- -->
-<!-- dbus\-launch manual page. -->
-<!-- Copyright (C) 2003 Red Hat, Inc. -->
-
-<refmeta>
-<refentrytitle>dbus-launch</refentrytitle>
-<manvolnum>1</manvolnum>
-</refmeta>
-<refnamediv id='name'>
-<refname>dbus-launch</refname>
-<refpurpose>Utility to start a message bus from a shell script</refpurpose>
-</refnamediv>
-<!-- body begins here -->
-<refsynopsisdiv id='synopsis'>
-<cmdsynopsis>
- <command>dbus-launch</command> <arg choice='opt'>--version </arg>
- <arg choice='opt'>--sh-syntax </arg>
- <arg choice='opt'>--csh-syntax </arg>
- <arg choice='opt'>--auto-syntax </arg>
- <arg choice='opt'>--exit-with-session </arg>
- <arg choice='opt'>--autolaunch=<replaceable>MACHINEID</replaceable></arg>
- <arg choice='opt'>--config-file=<replaceable>FILENAME</replaceable></arg>
- <arg choice='opt'><replaceable>PROGRAM</replaceable></arg>
- <arg choice='opt' rep='repeat'><replaceable>ARGS</replaceable></arg>
- <sbr/>
-</cmdsynopsis>
-</refsynopsisdiv>
-
-
-<refsect1 id='description'><title>DESCRIPTION</title>
-<para>The <command>dbus-launch</command> command is used to start a session bus
-instance of <emphasis remap='I'>dbus-daemon</emphasis> from a shell script.
-It would normally be called from a user's login
-scripts. Unlike the daemon itself, <command>dbus-launch</command> exits, so
-backticks or the $() construct can be used to read information from
-<command>dbus-launch</command>.</para>
-
-<para>With no arguments, <command>dbus-launch</command> will launch a session bus
-instance and print the address and pid of that instance to standard
-output.</para>
-
-<para>You may specify a program to be run; in this case, <command>dbus-launch</command>
-will launch a session bus instance, set the appropriate environment
-variables so the specified program can find the bus, and then execute the
-specified program, with the specified arguments. See below for
-examples.</para>
-
-<para>If you launch a program, <command>dbus-launch</command> will not print the
-information about the new bus to standard output.</para>
-
-<para>When <command>dbus-launch</command> prints bus information to standard output, by
-default it is in a simple key-value pairs format. However, you may
-request several alternate syntaxes using the --sh-syntax, --csh-syntax,
---binary-syntax, or
---auto-syntax options. Several of these cause <command>dbus-launch</command> to emit shell code
-to set up the environment.</para>
-
-<para>With the --auto-syntax option, <command>dbus-launch</command> looks at the value
-of the SHELL environment variable to determine which shell syntax
-should be used. If SHELL ends in "csh", then csh-compatible code is
-emitted; otherwise Bourne shell code is emitted. Instead of passing
---auto-syntax, you may explicity specify a particular one by using
---sh-syntax for Bourne syntax, or --csh-syntax for csh syntax.
-In scripts, it's more robust to avoid --auto-syntax and you hopefully
-know which shell your script is written in.</para>
-
-
-<para>See <ulink url='http://www.freedesktop.org/software/dbus/'>http://www.freedesktop.org/software/dbus/</ulink> for more information
-about D-Bus. See also the man page for <emphasis remap='I'>dbus-daemon</emphasis>.</para>
-
-
-<para>Here is an example of how to use <command>dbus-launch</command> with an
-sh-compatible shell to start the per-session bus daemon:</para>
-<literallayout remap='.nf'>
-
- ## test for an existing bus daemon, just to be safe
- if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
- ## if not found, launch a new one
- eval `dbus-launch --sh-syntax --exit-with-session`
- echo "D-Bus per-session daemon address is: $DBUS_SESSION_BUS_ADDRESS"
- fi
-
-</literallayout> <!-- .fi -->
-<para>You might run something like that in your login scripts.</para>
-
-
-<para>Another way to use <command>dbus-launch</command> is to run your main session
-program, like so:</para>
-<literallayout remap='.nf'>
-
-dbus-launch gnome-session
-
-</literallayout> <!-- .fi -->
-<para>The above would likely be appropriate for ~/.xsession or ~/.Xclients.</para>
-
-</refsect1>
-
-<refsect1 id='automatic_launching'><title>AUTOMATIC LAUNCHING</title>
-<para>If DBUS_SESSION_BUS_ADDRESS is not set for a process that tries to use
-D-Bus, by default the process will attempt to invoke dbus-launch with
-the --autolaunch option to start up a new session bus or find the
-existing bus address on the X display or in a file in
-~/.dbus/session-bus/</para>
-
-
-<para>Whenever an autolaunch occurs, the application that had to
-start a new bus will be in its own little world; it can effectively
-end up starting a whole new session if it tries to use a lot of
-bus services. This can be suboptimal or even totally broken, depending
-on the app and what it tries to do.</para>
-
-
-<para>There are two common reasons for autolaunch. One is ssh to a remote
-machine. The ideal fix for that would be forwarding of
-DBUS_SESSION_BUS_ADDRESS in the same way that DISPLAY is forwarded.
-In the meantime, you can edit the session.conf config file to
-have your session bus listen on TCP, and manually set
-DBUS_SESSION_BUS_ADDRESS, if you like.</para>
-
-
-<para>The second common reason for autolaunch is an su to another user, and
-display of X applications running as the second user on the display
-belonging to the first user. Perhaps the ideal fix in this case
-would be to allow the second user to connect to the session bus of the
-first user, just as they can connect to the first user's display.
-However, a mechanism for that has not been coded.</para>
-
-
-<para>You can always avoid autolaunch by manually setting
-DBUS_SESSION_BUS_ADDRESS. Autolaunch happens because the default
-address if none is set is "autolaunch:", so if any other address is
-set there will be no autolaunch. You can however include autolaunch in
-an explicit session bus address as a fallback, for example
-DBUS_SESSION_BUS_ADDRESS="something:,autolaunch:" - in that case if
-the first address doesn't work, processes will autolaunch. (The bus
-address variable contains a comma-separated list of addresses to try.)</para>
-
-
-<para>The --autolaunch option is considered an internal implementation
-detail of libdbus, and in fact there are plans to change it. There's
-no real reason to use it outside of the libdbus implementation anyhow.</para>
-
-</refsect1>
-
-<refsect1 id='options'><title>OPTIONS</title>
-<para>The following options are supported:</para>
-<variablelist remap='TP'>
- <varlistentry>
- <term><option>--auto-syntax</option></term>
- <listitem>
-<para>Choose --csh-syntax or --sh-syntax based on the SHELL environment variable.</para>
-
-<para><option>--binary-syntax</option>
-Write to stdout a nul-terminated bus address, then the bus PID as a
-binary integer of size sizeof(pid_t), then the bus X window ID as a
-binary integer of size sizeof(long). Integers are in the machine's
-byte order, not network byte order or any other canonical byte order.</para>
-
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>--close-stderr</option></term>
- <listitem>
-<para>Close the standard error output stream before starting the D-Bus
-daemon. This is useful if you want to capture dbus-launch error
-messages but you don't want dbus-daemon to keep the stream open to
-your application.</para>
-
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>--config-file=FILENAME</option></term>
- <listitem>
-<para>Pass --config-file=FILENAME to the bus daemon, instead of passing it
-the --session argument. See the man page for dbus-daemon</para>
-
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>--csh-syntax</option></term>
- <listitem>
-<para>Emit csh compatible code to set up environment variables.</para>
-
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>--exit-with-session</option></term>
- <listitem>
-<para>If this option is provided, a persistent "babysitter" process will be
-created that watches stdin for HUP and tries to connect to the X
-server. If this process gets a HUP on stdin or loses its X connection,
-it kills the message bus daemon.</para>
-
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>--autolaunch=MACHINEID</option></term>
- <listitem>
-<para>This option implies that <command>dbus-launch</command> should scan for a
-previously-started session and reuse the values found there. If no
-session is found, it will start a new session. The
---exit-with-session option is implied if --autolaunch is given.
-This option is for the exclusive use of libdbus, you do not want to
-use it manually. It may change in the future.</para>
-
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>--sh-syntax</option></term>
- <listitem>
-<para>Emit Bourne-shell compatible code to set up environment variables.</para>
-
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>--version</option></term>
- <listitem>
-<para>Print the version of dbus-launch</para>
-
- </listitem>
- </varlistentry>
-</variablelist>
-</refsect1>
-
-<refsect1 id='author'><title>AUTHOR</title>
-<para>See <ulink url='http://www.freedesktop.org/software/dbus/doc/AUTHORS'>http://www.freedesktop.org/software/dbus/doc/AUTHORS</ulink></para>
-
-</refsect1>
-
-<refsect1 id='bugs'><title>BUGS</title>
-<para>Please send bug reports to the D-Bus mailing list or bug tracker,
-see <ulink url='http://www.freedesktop.org/software/dbus/'>http://www.freedesktop.org/software/dbus/</ulink></para>
-</refsect1>
-</refentry>
-
diff --git a/cmake/tools/dbus-monitor.xml b/cmake/tools/dbus-monitor.xml
deleted file mode 100644
index b41cace2..00000000
--- a/cmake/tools/dbus-monitor.xml
+++ /dev/null
@@ -1,121 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-<!-- lifted from troff+man by doclifter -->
-<refentry id='dbusmonitor1'>
-<!-- -->
-<!-- dbus\-monitor manual page. -->
-<!-- Copyright (C) 2003 Red Hat, Inc. -->
-
-<refmeta>
-<refentrytitle>dbus-monitor</refentrytitle>
-<manvolnum>1</manvolnum>
-</refmeta>
-<refnamediv id='name'>
-<refname>dbus-monitor</refname>
-<refpurpose>debug probe to print message bus messages</refpurpose>
-</refnamediv>
-<!-- body begins here -->
-<refsynopsisdiv id='synopsis'>
-<cmdsynopsis>
- <command>dbus-monitor</command>
- <group choice='opt'><arg choice='plain'>--system </arg><arg choice='plain'>--session </arg><arg choice='plain'>--address <replaceable>ADDRESS</replaceable></arg></group>
- <group choice='opt'><arg choice='plain'>--profile </arg><arg choice='plain'>--monitor </arg></group>
- <arg choice='opt'><arg choice='plain'><replaceable>watch</replaceable></arg><arg choice='plain'><replaceable>expressions</replaceable></arg></arg>
- <sbr/>
-</cmdsynopsis>
-</refsynopsisdiv>
-
-
-<refsect1 id='description'><title>DESCRIPTION</title>
-<para>The <command>dbus-monitor</command> command is used to monitor messages going
-through a D-Bus message bus. See
-<ulink url='http://www.freedesktop.org/software/dbus/'>http://www.freedesktop.org/software/dbus/</ulink> for more information about
-the big picture.</para>
-
-
-<para>There are two well-known message buses: the systemwide message bus
-(installed on many systems as the "messagebus" service) and the
-per-user-login-session message bus (started each time a user logs in).
-The --system and --session options direct <command>dbus-monitor</command> to
-monitor the system or session buses respectively. If neither is
-specified, <command>dbus-monitor</command> monitors the session bus.</para>
-
-
-<para><command>dbus-monitor</command> has two different output modes, the 'classic'-style
-monitoring mode and profiling mode. The profiling format is a compact
-format with a single line per message and microsecond-resolution timing
-information. The --profile and --monitor options select the profiling
-and monitoring output format respectively. If neither is specified,
-<command>dbus-monitor</command> uses the monitoring output format.</para>
-
-
-<para>In order to get <command>dbus-monitor</command> to see the messages you are interested
-in, you should specify a set of watch expressions as you would expect to
-be passed to the <emphasis remap='I'>dbus_bus_add_match</emphasis> function.</para>
-
-
-<para>The message bus configuration may keep <command>dbus-monitor</command> from seeing
-all messages, especially if you run the monitor as a non-root user.</para>
-
-</refsect1>
-
-<refsect1 id='options'><title>OPTIONS</title>
-<variablelist remap='TP'>
- <varlistentry>
- <term><option>--system</option></term>
- <listitem>
-<para>Monitor the system message bus.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>--session</option></term>
- <listitem>
-<para>Monitor the session message bus. (This is the default.)</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>--address ADDRESS</option></term>
- <listitem>
-<para>Monitor an arbitrary message bus given at ADDRESS.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>--profile</option></term>
- <listitem>
-<para>Use the profiling output format.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>--monitor</option></term>
- <listitem>
-<para>Use the monitoring output format. (This is the default.)</para>
-
- </listitem>
- </varlistentry>
-</variablelist>
-</refsect1>
-
-<refsect1 id='example'><title>EXAMPLE</title>
-<para>Here is an example of using dbus-monitor to watch for the gnome typing
-monitor to say things</para>
-<literallayout remap='.nf'>
-
- dbus-monitor "type='signal',sender='org.gnome.TypingMonitor',interface='org.gnome.TypingMonitor'"
-
-</literallayout> <!-- .fi -->
-
-</refsect1>
-
-<refsect1 id='author'><title>AUTHOR</title>
-<para>dbus-monitor was written by Philip Blundell.
-The profiling output mode was added by Olli Salli.</para>
-
-</refsect1>
-
-<refsect1 id='bugs'><title>BUGS</title>
-<para>Please send bug reports to the D-Bus mailing list or bug tracker,
-see <ulink url='http://www.freedesktop.org/software/dbus/'>http://www.freedesktop.org/software/dbus/</ulink></para>
-</refsect1>
-</refentry>
-
diff --git a/cmake/tools/dbus-send.xml b/cmake/tools/dbus-send.xml
deleted file mode 100644
index 7fefc03e..00000000
--- a/cmake/tools/dbus-send.xml
+++ /dev/null
@@ -1,143 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-<!-- lifted from troff+man by doclifter -->
-<refentry id='dbussend1'>
-<!-- -->
-<!-- dbus\-send manual page. -->
-<!-- Copyright (C) 2003 Red Hat, Inc. -->
-
-<refmeta>
-<refentrytitle>dbus-send</refentrytitle>
-<manvolnum>1</manvolnum>
-</refmeta>
-<refnamediv id='name'>
-<refname>dbus-send</refname>
-<refpurpose>Send a message to a message bus</refpurpose>
-</refnamediv>
-<!-- body begins here -->
-<refsynopsisdiv id='synopsis'>
-<cmdsynopsis>
- <command>dbus-send</command>
- <group choice='opt'><arg choice='plain'>--system </arg><arg choice='plain'>--session </arg></group>
- <arg choice='opt'>--dest=<replaceable>NAME</replaceable></arg>
- <arg choice='opt'>--print-reply </arg>
- <arg choice='opt'>--type=<replaceable>TYPE</replaceable></arg>
- <arg choice='plain'><replaceable>&lt;destination</replaceable></arg>
- <arg choice='plain'><replaceable>object</replaceable></arg>
- <arg choice='plain'><replaceable>path&gt;</replaceable></arg>
- <arg choice='plain'><replaceable>&lt;message</replaceable></arg>
- <arg choice='plain'><replaceable>name&gt;</replaceable></arg>
- <arg choice='opt' rep='repeat'><replaceable>contents</replaceable></arg>
- <sbr/>
-</cmdsynopsis>
-</refsynopsisdiv>
-
-
-<refsect1 id='description'><title>DESCRIPTION</title>
-<para>The <command>dbus-send</command> command is used to send a message to a D-Bus message
-bus. See <ulink url='http://www.freedesktop.org/software/dbus/'>http://www.freedesktop.org/software/dbus/</ulink> for more
-information about the big picture.</para>
-
-
-<para>There are two well-known message buses: the systemwide message bus
-(installed on many systems as the "messagebus" service) and the
-per-user-login-session message bus (started each time a user logs in).
-The --system and --session options direct <command>dbus-send</command> to send
-messages to the system or session buses respectively. If neither is
-specified, <command>dbus-send</command> sends to the session bus.</para>
-
-
-<para>Nearly all uses of <command>dbus-send</command> must provide the --dest argument
-which is the name of a connection on the bus to send the message to. If
---dest is omitted, no destination is set.</para>
-
-
-<para>The object path and the name of the message to send must always be
-specified. Following arguments, if any, are the message contents
-(message arguments). These are given as type-specified values and
-may include containers (arrays, dicts, and variants) as described below.</para>
-
-<literallayout remap='.nf'>
-&lt;contents&gt; ::= &lt;item&gt; | &lt;container&gt; [ &lt;item&gt; | &lt;container&gt;...]
-&lt;item&gt; ::= &lt;type&gt;:&lt;value&gt;
-&lt;container&gt; ::= &lt;array&gt; | &lt;dict&gt; | &lt;variant&gt;
-&lt;array&gt; ::= array:&lt;type&gt;:&lt;value&gt;[,&lt;value&gt;...]
-&lt;dict&gt; ::= dict:&lt;type&gt;:&lt;type&gt;:&lt;key&gt;,&lt;value&gt;[,&lt;key&gt;,&lt;value&gt;...]
-&lt;variant&gt; ::= variant:&lt;type&gt;:&lt;value&gt;
-&lt;type&gt; ::= string | int16 | uint 16 | int32 | uint32 | int64 | uint64 | double | byte | boolean | objpath
-</literallayout> <!-- .fi -->
-
-<para>D-Bus supports more types than these, but <command>dbus-send</command> currently
-does not. Also, <command>dbus-send</command> does not permit empty containers
-or nested containers (e.g. arrays of variants).</para>
-
-
-<para>Here is an example invocation:</para>
-<literallayout remap='.nf'>
-
- dbus-send --dest=org.freedesktop.ExampleName \
- /org/freedesktop/sample/object/name \
- org.freedesktop.ExampleInterface.ExampleMethod \
- int32:47 string:'hello world' double:65.32 \
- array:string:"1st item","next item","last item" \
- dict:string:int32:"one",1,"two",2,"three",3 \
- variant:int32:-8 \
- objpath:/org/freedesktop/sample/object/name
-
-</literallayout> <!-- .fi -->
-
-<para>Note that the interface is separated from a method or signal
-name by a dot, though in the actual protocol the interface
-and the interface member are separate fields.</para>
-
-</refsect1>
-
-<refsect1 id='options'><title>OPTIONS</title>
-<para>The following options are supported:</para>
-<variablelist remap='TP'>
- <varlistentry>
- <term><option>--dest=NAME</option></term>
- <listitem>
-<para>Specify the name of the connection to receive the message.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>--print-reply</option></term>
- <listitem>
-<para>Block for a reply to the message sent, and print any reply received.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>--system</option></term>
- <listitem>
-<para>Send to the system message bus.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>--session</option></term>
- <listitem>
-<para>Send to the session message bus. (This is the default.)</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>--type=TYPE</option></term>
- <listitem>
-<para>Specify "method_call" or "signal" (defaults to "signal").</para>
-
- </listitem>
- </varlistentry>
-</variablelist>
-</refsect1>
-
-<refsect1 id='author'><title>AUTHOR</title>
-<para>dbus-send was written by Philip Blundell.</para>
-
-</refsect1>
-
-<refsect1 id='bugs'><title>BUGS</title>
-<para>Please send bug reports to the D-Bus mailing list or bug tracker,
-see <ulink url='http://www.freedesktop.org/software/dbus/'>http://www.freedesktop.org/software/dbus/</ulink></para>
-</refsect1>
-</refentry>
-