From bfa634493d48c828330fb2a66418873c3ccf2cb9 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Sat, 2 Oct 2021 15:46:12 -0500 Subject: build: fix pam and pam_misc dependencies Pam generates pkgconfig files now, so meson can use them to find the pam dependencies. --- meson.build | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'meson.build') diff --git a/meson.build b/meson.build index 838bfe3e..ea2b9a5d 100644 --- a/meson.build +++ b/meson.build @@ -42,14 +42,10 @@ else os = option_os endif -pam = get_option('pam') -if pam - libpam = cc.find_library('pam') - libpam_misc = cc.find_library('pam_misc') +pam_dep = dependency('pam', required : get_option('pam')) +if pam_dep.found() cc_pam_flags = '-DHAVE_PAM' else - libpam = [] - libpam_misc = [] cc_pam_flags = [] endif @@ -93,8 +89,12 @@ sbindir = rootprefix / get_option('sbindir') selinux_dep = dependency('libselinux', required : get_option('selinux')) if selinux_dep.found() cc_selinux_flags = '-DHAVE_SELINUX' - else + if pam_dep.found() + pam_misc_dep = dependency('pam_misc', required : get_option('pam')) + endif +else cc_selinux_flags = [] + pam_misc_dep = [] endif termcap = get_option('termcap') -- cgit v1.2.3