summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gorse <mgorse@suse.com>2023-05-11 12:18:56 -0500
committerMike Gorse <mgorse@suse.com>2023-05-11 12:18:56 -0500
commitd80c3b578ed595cb53b92f0c5fcb3d10c29c6dd5 (patch)
tree30ccf23ddda4a469cee498e79fc0db6464ac3a61
parent8fb6f3700e41d4f31ee2fd35b065ed10a16155ee (diff)
downloadat-spi2-core-d80c3b578ed595cb53b92f0c5fcb3d10c29c6dd5.tar.gz
Scan for dbus-daemon even if dbus-broker should be used by default
!134 broke the fallback to use dbus-daemon when dbus-broker was configured at build time but is not installed on the system. Fixes #115
-rw-r--r--bus/meson.build53
1 files changed, 29 insertions, 24 deletions
diff --git a/bus/meson.build b/bus/meson.build
index 2f3c5621..381f1164 100644
--- a/bus/meson.build
+++ b/bus/meson.build
@@ -46,38 +46,43 @@ launcher_args = [
'-DDATADIR="@0@"'.format(atspi_datadir),
]
+if get_option('dbus_daemon') != 'default'
+ launcher_args += '-DDBUS_DAEMON="@0@"'.format(get_option('dbus_daemon'))
+else
+ dbus_daemon = find_program('dbus-daemon',
+ '/sbin/dbus-daemon',
+ '/usr/sbin/dbus-daemon',
+ '/libexec/dbus-daemon',
+ '/usr/libexec/dbus-daemon',
+ '/usr/lib/dbus-daemon',
+ '/usr/pkg/bin/dbus-daemon',
+ required: false)
+ if dbus_daemon.found()
+ launcher_args += '-DDBUS_DAEMON="@0@"'.format(dbus_daemon.full_path())
+ endif
+endif
+
needs_systemd = false
-if get_option('default_bus') == 'dbus-daemon'
- if get_option('dbus_daemon') != 'default'
- launcher_args += '-DDBUS_DAEMON="@0@"'.format(get_option('dbus_daemon'))
- else
- dbus_daemon = find_program('dbus-daemon',
- '/sbin/dbus-daemon',
- '/usr/sbin/dbus-daemon',
- '/libexec/dbus-daemon',
- '/usr/libexec/dbus-daemon',
- '/usr/lib/dbus-daemon',
- '/usr/pkg/bin/dbus-daemon',
- required: false)
- if dbus_daemon.found()
- launcher_args += '-DDBUS_DAEMON="@0@"'.format(dbus_daemon.full_path())
- endif
+if get_option('dbus_broker') != 'default'
+ launcher_args += '-DDBUS_BROKER="@0@"'.format(get_option('dbus_broker'))
+ if get_option('default_bus') != 'dbus-daemon'
+ needs_systemd = true
endif
else
- launcher_args += '-DWANT_DBUS_BROKER'
- if get_option('dbus_broker') != 'default'
- launcher_args += '-DDBUS_BROKER="@0@"'.format(get_option('dbus_broker'))
- needs_systemd = true
- else
- dbus_broker = find_program('dbus-broker-launch',
- required: false)
- if dbus_broker.found()
- launcher_args += '-DDBUS_BROKER="@0@"'.format(dbus_broker.full_path())
+ dbus_broker = find_program('dbus-broker-launch',
+ required: false)
+ if dbus_broker.found()
+ launcher_args += '-DDBUS_BROKER="@0@"'.format(dbus_broker.full_path())
+ if get_option('default_bus') != 'dbus-daemon'
needs_systemd = true
endif
endif
endif
+if get_option('default_bus') == 'dbus-broker'
+ launcher_args += '-DWANT_DBUS_BROKER'
+endif
+
if needs_systemd
systemd_dep = dependency('libsystemd')
else