aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2024-04-09 12:04:33 +0200
committerKarel Zak <kzak@redhat.com>2024-04-09 12:04:33 +0200
commit688d25ee2111cc99ed893cc4c25aba0c5eaeeb99 (patch)
treeb231ee618a7c25dcac4ebeec6dfbf5dbec8b6be1
parentd37ca5d60be4dc85a2ff7039a5cb4713d6497f76 (diff)
parent9e3c5d1b5351333129a967dbf3b5ac4a78190772 (diff)
downloadutil-linux-688d25ee2111cc99ed893cc4c25aba0c5eaeeb99.tar.gz
Merge branch 'missing-pam' of https://github.com/jwillikers/util-linux
* 'missing-pam' of https://github.com/jwillikers/util-linux: meson: Disable targets requiring pam when it is missing
-rw-r--r--meson.build17
1 files changed, 7 insertions, 10 deletions
diff --git a/meson.build b/meson.build
index 58d75135a2..21822f0bd4 100644
--- a/meson.build
+++ b/meson.build
@@ -357,16 +357,13 @@ 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()
- lib_pam = cc.find_library('pam', required : get_option('build-chfn-chsh'))
-endif
-if not lib_pam.found()
- lib_pam = cc.find_library('pam', required : get_option('build-su'))
-endif
-if not lib_pam.found()
- lib_pam = cc.find_library('pam', required : get_option('build-runuser'))
-endif
+lib_pam = cc.find_library(
+ 'pam',
+ disabler : true,
+ required : get_option('build-login').enabled() or \
+ get_option('build-chfn-chsh').enabled() or \
+ get_option('build-su').enabled() or \
+ get_option('build-runuser').enabled())
if lib_pam.found()
lib_pam_misc = cc.find_library('pam_misc')
lib_pam = [lib_pam, lib_pam_misc]