From aaf82e9e63112ec01de97d2c2568b2fccf8ccad2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Fri, 28 Aug 2020 13:47:49 +0200 Subject: 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(-) (limited to 'meson.build') 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')) -- cgit v1.2.1