meson: add option for systemd_notify

Without this, systemd will be used if installed on the system automagically,
which is a problem if the built e.g. Xwayland is going to be used on a non-systemd
machine.

Bug: https://bugs.gentoo.org/908254
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James 2023-12-31 23:37:19 +00:00 committed by Peter Hutterer
parent d757aabd50
commit 515b240a24
3 changed files with 4 additions and 1 deletions

View File

@ -91,7 +91,7 @@ endif
conf_data.set('HAVE_LIBBSD', libbsd_dep.found() ? '1' : false)
# Note: this symbol is used by libXtrans.
conf_data.set('HAVE_SYSTEMD_DAEMON', libsystemd_daemon_dep.found() ? '1' : false)
conf_data.set('HAVE_SYSTEMD_DAEMON', build_systemd ? '1' : false)
conf_data.set('CONFIG_UDEV', build_udev ? '1' : false)
conf_data.set('CONFIG_UDEV_KMS', build_udev_kms ? '1' : false)
conf_data.set('HAVE_DBUS', build_dbus ? '1' : false)

View File

@ -107,6 +107,7 @@ xfont2_dep = dependency('xfont2', version: '>= 2.0')
dbus_required = get_option('systemd_logind') == 'true'
dbus_dep = dependency('dbus-1', version: '>= 1.0', required: dbus_required)
build_systemd = get_option('systemd_notify') == 'true'
# libsystemd-daemon was moved into libsystemd in version 209
libsystemd_daemon_dep = dependency('libsystemd', version: '>= 209', required: false)
if not libsystemd_daemon_dep.found()

View File

@ -75,6 +75,8 @@ option('udev', type: 'boolean', value: true)
option('udev_kms', type: 'boolean', value: true)
option('hal', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
description: 'Enable HAL integration')
option('systemd_notify', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
description: 'Enable systemd-notify support')
option('systemd_logind', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
description: 'Enable systemd-logind integration')
option('vgahw', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',