build: fix pam and pam_misc dependencies

Pam generates pkgconfig files now, so meson can use them to find the pam
dependencies.
This commit is contained in:
William Hubbs 2021-10-02 15:46:12 -05:00
parent a4d4d390be
commit bfa634493d
2 changed files with 12 additions and 12 deletions

View File

@ -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')

View File

@ -50,7 +50,7 @@ executable('openrc-run',
rc_selinux_c, version_h],
c_args : [cc_audit_flags, cc_branding_flags, cc_pam_flags, cc_selinux_flags],
link_with: [libeinfo, librc],
dependencies: [audit_dep, dl_dep, libpam, libpam_misc, selinux_dep, util_dep],
dependencies: [audit_dep, dl_dep, pam_dep, pam_misc_dep, selinux_dep, util_dep],
include_directories: [incdir, einfo_incdir, rc_incdir],
install: true,
install_dir: sbindir)
@ -85,7 +85,7 @@ executable('runscript',
rc_selinux_c, version_h],
c_args : [cc_audit_flags, cc_branding_flags, cc_pam_flags, cc_selinux_flags],
link_with: [libeinfo, librc],
dependencies: [audit_dep, dl_dep, libpam, util_dep, selinux_dep],
dependencies: [audit_dep, dl_dep, pam_dep, util_dep, selinux_dep],
include_directories: [incdir, einfo_incdir, rc_incdir],
install: true,
install_dir: sbindir)
@ -95,7 +95,7 @@ executable('start-stop-daemon',
rc_selinux_c, usage_c, version_h],
c_args : [cc_audit_flags, cc_branding_flags, cc_pam_flags, cc_selinux_flags],
link_with: [libeinfo, librc],
dependencies: [dl_dep, libpam, util_dep, selinux_dep],
dependencies: [dl_dep, pam_dep, util_dep, selinux_dep],
include_directories: [incdir, einfo_incdir, rc_incdir],
install: true,
install_dir: sbindir)
@ -105,7 +105,7 @@ executable('supervise-daemon',
usage_c, version_h],
c_args : [cc_branding_flags, cc_pam_flags, cc_selinux_flags],
link_with: [libeinfo, librc],
dependencies: [dl_dep, libpam, util_dep, selinux_dep],
dependencies: [dl_dep, pam_dep, util_dep, selinux_dep],
include_directories: [incdir, einfo_incdir, rc_incdir],
install: true,
install_dir: sbindir)
@ -168,7 +168,7 @@ executable('checkpath',
c_args : [cc_audit_flags, cc_branding_flags, cc_pam_flags, cc_selinux_flags],
include_directories: [incdir, einfo_incdir, rc_incdir],
link_with: [libeinfo, librc],
dependencies: [libpam, selinux_dep],
dependencies: [pam_dep, selinux_dep],
install: true,
install_dir: rc_bindir)