From 5a5ede3156fe7b223a158044ea8e1dae685dbb01 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Fri, 8 Oct 2021 10:46:42 -0500 Subject: support older pam versions Some distros are still using versions of pam which do not create *.pc files, so we need fallback logic for that situation. --- meson.build | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'meson.build') diff --git a/meson.build b/meson.build index ea2b9a5d..00c4f2d9 100644 --- a/meson.build +++ b/meson.build @@ -43,6 +43,9 @@ else endif pam_dep = dependency('pam', required : get_option('pam')) +if not pam_dep.found() + pam_dep = cc.find_library('pam', required : get_option('pam')) +endif if pam_dep.found() cc_pam_flags = '-DHAVE_PAM' else @@ -91,6 +94,9 @@ if selinux_dep.found() cc_selinux_flags = '-DHAVE_SELINUX' if pam_dep.found() pam_misc_dep = dependency('pam_misc', required : get_option('pam')) + if not pam_misc_dep.found() + pam_misc_dep = cc.find_library('pam_misc', required : get_option('pam')) + endif endif else cc_selinux_flags = [] -- cgit v1.2.3