diff options
author | Trent Lloyd <lathiat@bur.st> | 2005-09-14 17:14:40 +0000 |
---|---|---|
committer | Trent Lloyd <lathiat@bur.st> | 2005-09-14 17:14:40 +0000 |
commit | b1f9dc9aa9c68b0b5b2fabc05d8ceb60c26bcd96 (patch) | |
tree | 37f69181ea79585bda24e1542f216ebd00dc538f /configure.ac | |
parent | 907792fc1795c8552fac295ae98fc34d23097f1c (diff) |
* Try to guess where the D-BUS socket is before defaulting (this is for gentoo and arch users where its different than other distros)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@586 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 41f41c2..d8546d8 100644 --- a/configure.ac +++ b/configure.ac @@ -286,9 +286,19 @@ if test "x$HAVE_DBUS" = "xyes" ; then if ! test -z "$with_dbus_system_address" ; then DBUS_SYSTEM_BUS_DEFAULT_ADDRESS="$with_dbus_system_address" else - # Note this default path is hardcoded in D-BUS and should - # not use $localstatedir + # This is ugly, but D-BUS doesn't export this address for us + # so we have to guess, pretty much all setups i've seen have + # it in /var/lib/dbus or /var/run/dbus, and its defaulted to + # /var/run upstream so we will try guess first then default + # to /var/run/dbus + DBUS_SYSTEM_BUS_DEFAULT_ADDRESS="unix:path=/var/run/dbus/system_bus_socket" + TRY_SOCKETS="/var/lib/dbus/system_bus_socket /var/run/dbus/system_bus_socket" + for sock in $TRY_SOCKETS; do + if test -S $sock; then + DBUS_SYSTEM_BUS_DEFAULT_ADDRESS="unix:path=$sock" + fi + done fi AC_SUBST(DBUS_SYSTEM_BUS_DEFAULT_ADDRESS) |