From: Alexander Shursha Date: Fri, 6 Dec 2024 13:45:20 +0000 (+0300) Subject: meson: Check options for building lib_pam_misc X-Git-Tag: v2.42-start~101^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=874ab9ed3895a28bc691b441fe4e683326765786;p=thirdparty%2Futil-linux.git meson: Check options for building lib_pam_misc On FreeBSD run --auto-features=disabled -Dbuild-libblkid=enabled -Dprogram-tests=false meson failure: meson.build:378:20: ERROR: C shared or static library 'pam_misc' not found Sponsored by: Future Crew, LLC --- diff --git a/meson.build b/meson.build index 949a0e41f..28f0df8ba 100644 --- a/meson.build +++ b/meson.build @@ -367,15 +367,19 @@ if not lib_crypt.found() lib_crypt = cc.find_library('crypt', required : get_option('build-sulogin')) endif +pam_requirement = get_option('build-login').enabled() or \ + get_option('build-chfn-chsh').enabled() or \ + get_option('build-su').enabled() or \ + get_option('build-runuser').enabled() 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()) + required : pam_requirement) if lib_pam.found() - lib_pam_misc = cc.find_library('pam_misc') + lib_pam_misc = cc.find_library( + 'pam_misc', + disabler : true, + required : pam_requirement) lib_pam = [lib_pam, lib_pam_misc] else lib_pam_misc = declare_dependency()