summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2022-05-18 16:13:36 +0100
committerSimon McVittie <smcv@collabora.com>2022-10-11 17:14:11 +0100
commite5d8d0c19ad932dad44b3302c90ba692d3a9017a (patch)
tree5d0301595d4387629842f14d1d01d2831b98ca39 /configure.ac
parentba6fb129bdb57320f84032e02f34a98d433caf14 (diff)
downloaddbus-e5d8d0c19ad932dad44b3302c90ba692d3a9017a.tar.gz
build: Show a warning if the system bus socket is not interoperable
We would like to start using ${runstatedir}/dbus/system_bus_socket, so that distributors who make /var/run a symbolic link to /run will usually get their dbus-daemon listening on /run/dbus/system_bus_socket, which has some advantages in corner cases, such as when /var is mediated by an automounter or is unmounted during system shutdown. Unfortunately, the interoperable path in the D-Bus Specification is /var/run/dbus/system_bus_socket for historical reasons (D-Bus is older than /run), and older versions of Slackware are known to have had /run and /var/run as distinct directories. Do a check during configuration to catch systems configured like this and show a warning. When cross-compiling, this assumes that the system where dbus is built (the build system in Autotools/Meson, or the "host" in CMake terminology) has its /var/run and /run set up in a way that is compatible with the system where dbus will run (the host system in Autotools/Meson, or the "target" in CMake terminology). This is not 100% correct, but seems good enough for a warning that will hopefully only trigger for misguided OS distributors. Signed-off-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac4
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 3abbafc5..ca704344 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1340,6 +1340,10 @@ AS_IF([! test -z "$with_system_socket"],
DBUS_SYSTEM_SOCKET=${EXPANDED_LOCALSTATEDIR}/run/dbus/system_bus_socket
])
+dnl The actual check script is shared between Autotools and CMake.
+AS_IF([test "$dbus_win" != yes],
+ [${CONFIG_SHELL-/bin/sh} "${srcdir}/tools/check-runstatedir.sh" "$DBUS_SYSTEM_SOCKET"])
+
AC_SUBST(DBUS_SYSTEM_SOCKET)
AC_DEFINE_UNQUOTED(DBUS_SYSTEM_SOCKET,"$DBUS_SYSTEM_SOCKET",[The name of the socket the system bus listens on by default])