]>
Commit | Line | Data |
---|---|---|
6b61e282 TW |
1 | build_pam_lastlog2 = not get_option('build-pam-lastlog2') \ |
2 | .require(build_liblastlog2) \ | |
3 | .require(conf.get('HAVE_SECURITY_PAM_MODULES_H').to_string() == '1') \ | |
4 | .disabled() | |
5 | summary('pam_lastlog2', build_pam_lastlog2 ? 'enabled' : 'disabled', section : 'components') | |
6 | ||
c2e299d0 SS |
7 | cc = meson.get_compiler('c') |
8 | pkg = import('pkgconfig') | |
9 | lib_pam_lastlog2_sources = ''' | |
10 | src/pam_lastlog2.c | |
11 | '''.split() | |
12 | ||
13 | pamlibdir = get_option('pamlibdir') | |
14 | if pamlibdir == '' | |
15 | pamlibdir = get_option('libdir') / 'security' | |
16 | endif | |
17 | ||
6b61e282 | 18 | if build_pam_lastlog2 |
c2e299d0 SS |
19 | pam_lastlog2_sym = 'src/pam_lastlog2.sym' |
20 | pam_lastlog2_sym_path = '@0@/@1@'.format(meson.current_source_dir(), pam_lastlog2_sym) | |
21 | ||
22 | libpam = cc.find_library('pam') | |
23 | ||
7c080286 | 24 | pam_lastlog2 = shared_module( |
c2e299d0 SS |
25 | 'pam_lastlog2', |
26 | lib_pam_lastlog2_sources, | |
27 | name_prefix : '', | |
485d877f | 28 | include_directories : [dir_include], |
c2e299d0 SS |
29 | link_args : ['-Wl,--version-script=@0@'.format(pam_lastlog2_sym_path)], |
30 | link_depends : pam_lastlog2_sym, | |
485d877f | 31 | dependencies : [libpam, lastlog2_dep], |
c2e299d0 SS |
32 | install : build_liblastlog2, |
33 | install_dir : pamlibdir, | |
c2e299d0 SS |
34 | ) |
35 | manadocs += ['pam_lastlog2/man/pam_lastlog2.8.adoc'] | |
c2e299d0 | 36 | endif |