From 9257ef1f6e106bdedc40e34588b31bec39d6b5b1 Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Mon, 3 Apr 2023 19:52:20 -0500 Subject: 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. --- meson.build | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) (limited to 'meson.build') 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'), -- cgit v1.2.1