aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-11-22 10:30:36 +0000
committerWilliam Hubbs <w.d.hubbs@gmail.com>2021-11-27 13:13:35 -0600
commitb868fc2c8d8068ef4804ef9f5bc19b9c5dc8ae19 (patch)
treecc79e9540549b9ea2b69185610532dec8e1f8fa3 /meson.build
parentf3f0fde861b438c80f99afdd49fe175e9d0a68ca (diff)
meson: only find libcrypt if SELinux and no PAM
We only need libcrypt if we're building _with_ SELinux and _without_ PAM. We don't use libcrypt for general SELinux with PAM. This is mostly a correctness change as libcrypt should generally be available (as opposed to the previous change which fixed some real-world cases). Fixes: f3f0fde861b438c80f99afdd49fe175e9d0a68ca Fixes: #478
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build4
1 files changed, 3 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 1ee10751..fe0e04ef 100644
--- a/meson.build
+++ b/meson.build
@@ -93,7 +93,7 @@ rc_bindir = rc_libexecdir / 'bin'
rc_sbindir = rc_libexecdir / 'sbin'
sbindir = rootprefix / get_option('sbindir')
-crypt_dep = dependency('libcrypt', required : not get_option('pam'))
+crypt_dep = []
selinux_dep = dependency('libselinux', required : get_option('selinux'))
pam_misc_dep = []
@@ -107,6 +107,8 @@ if selinux_dep.found()
if not pam_misc_dep.found() and get_option('pam')
error('Pam was requested but could not be located')
endif
+ else
+ crypt_dep = dependency('libcrypt', required : not get_option('pam'))
endif
else
cc_selinux_flags = []