Commit graph

390 commits

Author SHA1 Message Date
Ralf Habacker
797b511deb Install empty session.d config directory using cmake, otherwise dbus-daemon will not start
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41319
2011-10-17 15:45:49 +02:00
Simon McVittie
301fa555ac cmake: don't include -util sources in the shared library
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34976
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
2011-10-12 18:14:51 +01:00
Simon McVittie
617eaa9ef9 Remove dbus-auth-script from the shared library
Only the tests use this.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34976
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
2011-10-12 18:14:09 +01:00
Ralf Habacker
7973504156 Merged cmake and autotools session bus configuration
cmake and autotools session bus configuration templates are identical,
so cmake now uses the autotools.
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41319
2011-09-29 14:08:03 +02:00
Simon McVittie
c141af6147 Remove EXT variable from CMake, just use Automake-compatible EXEEXT
According to Ralf, there's no standard name for this in CMake, so we
might as well use the standard Automake name.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41222
2011-09-28 19:01:15 +01:00
Simon McVittie
e9f0378bbf Merge tests' cmake and autotools bus configuration
In Unix, the tests listened on both debug-pipe (which is a socketpair,
or a TCP emulation of socketpair on Windows) and a Unix socket.

In the Windows port, the tests were hard-coded to listen on a particular
port, which allowed the dispatch test to connect to that port, as long
as no two tests ran simultaneously (which I don't think was ever guaranteed -
make -j can violate this). That's valid out-of-process, and also
fully-specified, so they only needed one <listen> directive, so the
CMake input only had one.

To make the tests work under CMake on Unix, there was a hack: the string
substituted for the content of the <listen> directive contained
</listen><listen> to get the other address in, which is pretty nasty.

Instead of doing that, I've made both build systems, on both Unix and
Windows, use both debug-pipe and a more normal transport (Unix or TCP).
debug-pipe has a Windows implementation and it's used in
dbus-spawn-win.c, so it'd better work. The use of debug-pipe is now
hard-coded rather than being a configure parameter (there's no reason
to vary it in different builds), and I used TEST_LISTEN as the name of the
Unix/TCP address, because it's a "vague" address (no specific Unix path, no
TCP port), that you can listen on but not connect to.

This in turn means that we can merge the Autoconf .in and CMake .cmake
files, similar to Bug #41033.

You might wonder why I've kept debug-pipe. I did try to get rid of it, but
it turns out that the tests in dispatch.c rely on
dbus_connection_open_private() not blocking, and normal socket
connections block on connect(). Until we fix that by adding an async
version of dbus_connection_open_private(), it won't be safe to have a
test like dispatch.c that "talks to itself", unless it uses a transport
as trivial as debug-pipe in which neither end has to block on the other.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41222
2011-09-28 19:00:56 +01:00
Simon McVittie
2f2618294d cmake: remove unused TEST_SERVICE_DIR variable
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41222
2011-09-28 19:00:54 +01:00
Simon McVittie
33c43947cd Simplify substitution of test executables to use fewer variables
Also use EXEEXT in all the service files, even in the automake build
system.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41222
2011-09-28 19:00:49 +01:00
Simon McVittie
6934bc6927 Simplify generation of bus configuration files
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41222
2011-09-28 19:00:11 +01:00
Ralf Habacker
ba033709b5 Merge branch 'dbus-1.4' 2011-09-24 08:35:49 +02:00
Ralf Habacker
ff3f4860ef Use dbus/dbus-arch-deps.h.in as source for cmake too
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41033
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-09-23 15:38:12 +02:00
Ralf Habacker
443b8ec3da Merge branch 'dbus-1.4'
Conflicts:
	cmake/CMakeLists.txt
2011-09-22 21:26:43 +02:00
Ralf Habacker
1767840160 Added cmake 'help-options' target to print out all available configure options
cherry-picked 5a0c5663eb
2011-09-22 20:32:42 +02:00
Ralf Habacker
37a81fc981 fixed cmake error: doc says CACHE needs type *and* doc string
cherry-picked aba867f242
2011-09-22 20:27:59 +02:00
Ralf Habacker
2f3403c37b Limit batch file creating to windows
cherry-picked 84b03cae58
2011-09-22 20:27:58 +02:00
Ralf Habacker
b49e278667 Fixed cmake buildsystem - option command only supports boolean values
Conflicts:

	cmake/CMakeLists.txt

cherry picked 4ee7b07b20 from master
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-09-22 20:03:48 +02:00
Ralf Habacker
e41d163083 cmake fix: generate build timestamp
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41029
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-09-22 19:55:13 +02:00
Ralf Habacker
692baa9d6a Simplified cmake xml parser dependencies.
Find either expat or libxml2 xml parser libraries, depending on -DDBUS_USE_EXPAT=ON|OFF

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41027
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-09-22 19:33:32 +02:00
Ralf Habacker
c1989c1a4f Merge branch 'dbus-1.4' 2011-09-20 19:37:39 +02:00
Ralf Habacker
70b0ffd501 cmake fix: install version string
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=40905
2011-09-20 19:34:38 +02:00
Ralf Habacker
4a3e5b0af4 Fix compilation on MSVC, which doesn't understand "inline" with its C99 meaning.
This fix is limited to msvc compilers only.

Reviewed-by:Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-08-13 22:08:26 +02:00
Ralf Habacker
b0b5f9b134 Win32 compile fix.
msvc compilers define 'inline' only for c++ code, so wrap it
with a platform independent DBUS_INLINE define in cmake
generated config.h.
2011-08-05 23:01:10 +02:00
Simon McVittie
d6ad37c304 Merge branch 'dbus-1.4' 2011-08-05 14:18:27 +01:00
Simon McVittie
c1bcd2269c cmake: always enable GNU and recent-POSIX extensions, like autoconf does
If the C library is (e)glibc, this allows use of POSIX, BSD, SVID, GNU,
etc., extensions to ISO C, regardless of using -ansi or not.

Not doing this broke the cmake build on Linux since commit 18b08180,
which added AC_USE_SYSTEM_EXTENSIONS to configure.ac (and removed
_GNU_SOURCE from files that use it) without also updating the cmake
build system. SO_PEERCRED is defined unconditionally, but struct ucred
is considered to be a GNU extension, so can't be used under _GNU_SOURCE.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=29228
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-08-05 14:17:51 +01:00
Simon McVittie
e3c12a86d6 Remove remnants of dbus-viewer
Parts of it were already missing, it wasn't compiled, and it depends on
dbus-glib and Gtk.
2011-07-29 11:49:20 +01:00
Simon McVittie
274e0fbc20 Simplify linking for tests that use libdbus-testutils
This is the library used by tests that link libdbus-internal and DBusLoop.
By linking libdbus-internal into it, we can avoid having to repeat that
dependency all over the place - libtool and cmake both know how to follow
recursive dependencies.

In cmake, also use libdbus-testutils for more tests, in preference to
repeating its source files.
2011-07-29 11:17:17 +01:00
Simon McVittie
44a7524dde Stop defining DBUS_API_SUBJECT_TO_CHANGE
Seriously.
2011-07-29 11:06:50 +01:00
Simon McVittie
0ecd0a02b9 Merge remote-tracking branch 'origin/dbus-1.4' 2011-07-11 13:23:38 +01:00
Ralf Habacker
110e06a78c Added DBUS_ENABLE_STATS option to cmake buildsystem to keep in sync with autotools. 2011-07-08 10:55:46 +02:00
Ralf Habacker
836b84a05a Collected cmake doc into README.cmake. 2011-07-08 10:55:03 +02:00
Ralf Habacker
4ee7b07b20 Fixed cmake buildsystem - option command only supports boolean values 2011-07-04 23:47:45 +02:00
Ralf Habacker
84b03cae58 Limit batch file creating to windows 2011-07-03 01:39:09 +02:00
Ralf Habacker
b77885c1db Fixed cmake buildsystem on unix - option command only supports boolean values 2011-07-03 01:36:48 +02:00
Ralf Habacker
6321a98492 Collected cmake doc into README.cmake. 2011-07-02 21:02:46 +02:00
Ralf Habacker
a7f98d8819 Added DBUS_ENABLE_STATS option to cmake buildsystem to keep in sync with autotools. 2011-07-02 00:53:23 +02:00
Ralf Habacker
736445ee44 CMake fix: Do not use FORCE in variables which should be changeable by the user. 2011-06-20 09:29:12 +02:00
Ralf Habacker
aba867f242 fixed cmake error: doc says CACHE needs type *and* doc string 2011-06-14 18:45:46 +02:00
Simon McVittie
c83287898c Merge branch 'dbus-1.4' 2011-06-10 18:52:07 +01:00
Simon McVittie
90f36efbc3 Add support for building "modular" tests, which require GLib and dbus-glib
For the moment, the CMake build system only knows about the existing
"embedded tests"; make it define both symbols, though.

We use GLib because it has GTester (and life's too short to write yet another
JUnit clone), and dbus-glib for the main-loop integration only (see
fd.o #31515 for thoughts on incorporating just those two functions in a
separate library in the dbus tarball).

I'm not using DBusLoop for the main loop because I specifically don't
want to use non-public API or ABI of libdbus in the modular tests. If we make
sure they work against a shared libdbus, we can use them to test the
installed system, with "make installcheck".

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570
2011-06-10 18:31:31 +01:00
Ralf Habacker
b1e28fba0b Fixes for Visual Studio 2010 cmake generator - reported by Ray Satiro. 2011-05-28 14:02:15 +02:00
Ralf Habacker
6d2b67fc03 Fixed cmake syntax errors. 2011-05-28 14:02:14 +02:00
Simon McVittie
fd99c3a1c1 Merge branch 'dbus-1.4' 2011-05-25 17:39:34 +01:00
Simon McVittie
cea055514a Check for X even if X11 autolaunching is disabled
DBUS_ENABLE_X11_AUTOLAUNCH obviously requires DBUS_BUILD_X11. However,
the converse is not true.

If DBUS_BUILD_X11 is defined, dbus-launch will be able to connect to
the X server to determine when the session ends; most distributors will
want this, but it can be disabled with the standard Autoconf option
--without-x.

If DBUS_ENABLE_X11_AUTOLAUNCH is *also* defined, dbus-launch and libdbus
will be willing to perform autolaunch. Again, most distributors will want
this, but it can be disabled with --disable-x11-autolaunch.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=19997
Reviewed-by: Colin Walters <walters@verbum.org>
2011-05-25 17:38:44 +01:00
Ralf Habacker
0c47090d0e Definition is obsolate with commit e0fc90bdf2 2011-05-25 16:08:19 +01:00
Ralf Habacker
45de11f029 To avoid double dbus version definitions take values from configure.ac. 2011-05-25 16:08:16 +01:00
Ralf Habacker
5a0c5663eb Added cmake 'help-options' target to print out all available configure options 2011-05-22 23:01:13 +02:00
Ralf Habacker
fb909f7e0e Cleaned public cmake option naming. 2011-05-22 22:54:49 +02:00
Ralf Habacker
7665196531 Definition is obsolate with commit e0fc90bdf2 2011-05-22 16:53:48 +02:00
Ralf Habacker
39703607e4 To avoid double dbus version definitions take values from configure.ac. 2011-05-22 13:02:34 +02:00
Simon McVittie
f04e52a2e5 Allow X11 autolaunch to be disabled even if the headers/libraries are there
In an embedded system where the D-Bus session is a core part of the
environment, like Maemo, accidentally auto-launching a second session bus
(for instance for a concurrent ssh session) is a bad idea - it can lead
to a "split brain" situation where half the applications in the GUI are
using a different bus. In these controlled environments, it'd be useful
to prevent autolaunch from ever happening.

(As a side benefit, the changes to configure.in also mean that packagers
can explicitly --enable-x11-autolaunch, to make sure that failure to find
X will make compilation fail cleanly.)

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=19997
Bug-NB: NB#219964
2011-02-24 18:58:18 +00:00