aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2021-10-02 15:46:12 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2021-10-02 16:10:45 -0500
commitbfa634493d48c828330fb2a66418873c3ccf2cb9 (patch)
tree887769eebdba37e0e95c6feb8d0743ca5026011d /meson.build
parenta4d4d390bea0781d12304e145eff88d704ccbfdc (diff)
build: fix pam and pam_misc dependencies
Pam generates pkgconfig files now, so meson can use them to find the pam dependencies.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build14
1 files changed, 7 insertions, 7 deletions
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')