[gdm: 6/11] meson: When possible use systemd dirs to check for systemd utils




commit aaf82e9e63112ec01de97d2c2568b2fccf8ccad2
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Fri Aug 28 13:47:49 2020 +0200

    meson: When possible use systemd dirs to check for systemd utils
    
    With meson 0.53 we can check whether a binary is in a specified path, as it
    was possible with `AC_PATH_PROG`, so use it as we did before of meson switch
    even if I'm not sure that this tool is shipped by most distros these days

 meson.build | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index 08aa1aff..2bb3982c 100644
--- a/meson.build
+++ b/meson.build
@@ -97,7 +97,17 @@ endif
 systemd_dep = dependency('systemd')
 libsystemd_dep = dependency('libsystemd')
 journald_dep = dependency('journald', required: get_option('systemd-journal'))
-systemd_multiseat_x = find_program('systemd-multi-seat-x', required: false)
+if meson.version().version_compare('>= 0.53')
+  systemd_multiseat_x = find_program('systemd-multi-seat-x',
+    required: false,
+    dirs: [
+      systemd_dep.get_pkgconfig_variable('systemdutildir'),
+      '/lib/systemd',
+      '/usr/lib/systemd',
+    ])
+else
+  systemd_multiseat_x = find_program('systemd-multi-seat-x', required: false)
+endif
 systemd_x_server = systemd_multiseat_x.found()? systemd_multiseat_x.path() : 
'/lib/systemd/systemd-multi-seat-x'
 # Plymouth
 plymouth_dep = dependency('ply-boot-client', required: get_option('plymouth'))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]