aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2024-04-02 08:49:48 +0200
committerKarel Zak <kzak@redhat.com>2024-04-02 08:49:48 +0200
commit3400ca5a9f3174308fea9c106ee3678bd58deabd (patch)
tree7117b7bdb129000995543f48b9baf82aac166e8f
parentf92ed3aa66bbd1df5156f8aa16723c9245265625 (diff)
parentd0a07e7fb8109e9fdeb5e2c90c019c0cf5f92009 (diff)
downloadutil-linux-3400ca5a9f3174308fea9c106ee3678bd58deabd.tar.gz
Merge branch 'meson-fix-crypt-dep' of https://github.com/jwillikers/util-linux
* 'meson-fix-crypt-dep' of https://github.com/jwillikers/util-linux: meson: Only require the crypt library when necessary
-rw-r--r--meson.build5
1 files changed, 4 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 38e25185bf..b74733d1b3 100644
--- a/meson.build
+++ b/meson.build
@@ -350,7 +350,10 @@ lib_udev = dependency(
required : get_option('systemd'))
conf.set('HAVE_LIBUDEV', lib_udev.found() ? 1 : false)
-lib_crypt = cc.find_library('crypt')
+lib_crypt = cc.find_library('crypt', required : get_option('build-newgrp'))
+if not lib_crypt.found()
+ lib_crypt = cc.find_library('crypt', required : get_option('build-sulogin'))
+endif
lib_pam = cc.find_library('pam', required : get_option('build-login'))
if not lib_pam.found()