build: pam fix

Set the HAVE_PAM option if the dependency is found *and* pam is
requested.

X-Gentoo-Bug: 821211
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=821211
This commit is contained in:
William Hubbs 2021-11-06 19:37:37 -05:00
parent 3908687559
commit 9d4f11f726

View File

@ -46,7 +46,7 @@ pam_dep = dependency('pam', required: false)
if not pam_dep.found() if not pam_dep.found()
pam_dep = cc.find_library('pam', required: false) pam_dep = cc.find_library('pam', required: false)
endif endif
if pam_dep.found() if pam_dep.found() and get_option('pam')
cc_pam_flags = '-DHAVE_PAM' cc_pam_flags = '-DHAVE_PAM'
else else
cc_pam_flags = [] cc_pam_flags = []