summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-04-03 19:52:20 -0500
committerRay Strode <halfline@gmail.com>2023-04-28 19:44:52 +0000
commit9257ef1f6e106bdedc40e34588b31bec39d6b5b1 (patch)
tree027ab3552bcfc28683f6300a80eb1e7ceab9a27f /meson.build
parent396a61fbeab9b37fed03c1fa35ea9dced0951426 (diff)
downloadgdm-9257ef1f6e106bdedc40e34588b31bec39d6b5b1.tar.gz
meson: allow building with elogind
Currently, the GDM meson build has a hard dependency on systemd. However, GDM can function just fine if one is using elogind. This allows a user to build GDM against libelogind and also disable the systemd system and user units.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build29
1 files changed, 19 insertions, 10 deletions
diff --git a/meson.build b/meson.build
index 57116f2a..ffb292c5 100644
--- a/meson.build
+++ b/meson.build
@@ -100,16 +100,24 @@ if xdmcp_dep.found() and get_option('tcp-wrappers')
libwrap_dep = cc.find_library('wrap')
endif
# systemd
-systemd_dep = dependency('systemd')
-libsystemd_dep = dependency('libsystemd')
-systemd_multiseat_x = find_program('systemd-multi-seat-x',
- required: false,
- dirs: [
- systemd_dep.get_pkgconfig_variable('systemdutildir'),
- '/lib/systemd',
- '/usr/lib/systemd',
- ])
-systemd_x_server = systemd_multiseat_x.found()? systemd_multiseat_x.path() : '/lib/systemd/systemd-multi-seat-x'
+logind_provider = get_option('logind-provider')
+systemd_dep = dependency('systemd', required: false)
+if logind_provider == 'systemd'
+ libsystemd_dep = dependency('libsystemd')
+ logind_dep = libsystemd_dep
+ systemd_multiseat_x = find_program('systemd-multi-seat-x',
+ required: false,
+ dirs: [
+ systemd_dep.get_pkgconfig_variable('systemdutildir'),
+ '/lib/systemd',
+ '/usr/lib/systemd',
+ ])
+ systemd_x_server = systemd_multiseat_x.found()? systemd_multiseat_x.path() : '/lib/systemd/systemd-multi-seat-x'
+else
+ elogind_dep = dependency('libelogind')
+ logind_dep = elogind_dep
+ systemd_x_server = 'disabled'
+endif
# Plymouth
plymouth_dep = dependency('ply-boot-client', required: get_option('plymouth'))
# Check for Solaris auditing API (ADT)
@@ -319,6 +327,7 @@ summary({
'PAM Syslog': have_pam_syslog,
'Supports PAM Extensions': pam_extensions_supported,
'SeLinux': libselinux_dep.found(),
+ 'Logind Provider': get_option('logind-provider'),
'Use GDM Xsession': get_option('gdm-xsession'),
'Use UserDisplayServer': get_option('user-display-server'),
'Use SystemdJournal': get_option('systemd-journal'),