summaryrefslogtreecommitdiffstats
path: root/pam_lastlog2/meson.build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-14 19:23:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-14 19:23:00 +0000
commit803b3a091c225d48395508a8f9ffa6e08cbddc5b (patch)
treea3168c9e7da8991c423b5978aacf90c3c2b135c1 /pam_lastlog2/meson.build
parentReleasing progress-linux version 2.40-8~progress7.99u1. (diff)
downloadutil-linux-803b3a091c225d48395508a8f9ffa6e08cbddc5b.tar.xz
util-linux-803b3a091c225d48395508a8f9ffa6e08cbddc5b.zip
Merging upstream version 2.40.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'pam_lastlog2/meson.build')
-rw-r--r--pam_lastlog2/meson.build36
1 files changed, 36 insertions, 0 deletions
diff --git a/pam_lastlog2/meson.build b/pam_lastlog2/meson.build
new file mode 100644
index 0000000..12f3a6b
--- /dev/null
+++ b/pam_lastlog2/meson.build
@@ -0,0 +1,36 @@
+build_pam_lastlog2 = not get_option('build-pam-lastlog2') \
+ .require(build_liblastlog2) \
+ .require(conf.get('HAVE_SECURITY_PAM_MODULES_H').to_string() == '1') \
+ .disabled()
+summary('pam_lastlog2', build_pam_lastlog2 ? 'enabled' : 'disabled', section : 'components')
+
+cc = meson.get_compiler('c')
+pkg = import('pkgconfig')
+lib_pam_lastlog2_sources = '''
+ src/pam_lastlog2.c
+'''.split()
+
+pamlibdir = get_option('pamlibdir')
+if pamlibdir == ''
+ pamlibdir = get_option('libdir') / 'security'
+endif
+
+if build_pam_lastlog2
+ pam_lastlog2_sym = 'src/pam_lastlog2.sym'
+ pam_lastlog2_sym_path = '@0@/@1@'.format(meson.current_source_dir(), pam_lastlog2_sym)
+
+ libpam = cc.find_library('pam')
+
+ pam_lastlog2 = shared_module(
+ 'pam_lastlog2',
+ lib_pam_lastlog2_sources,
+ name_prefix : '',
+ include_directories : [dir_include],
+ link_args : ['-Wl,--version-script=@0@'.format(pam_lastlog2_sym_path)],
+ link_depends : pam_lastlog2_sym,
+ dependencies : [libpam, lastlog2_dep],
+ install : build_liblastlog2,
+ install_dir : pamlibdir,
+ )
+ manadocs += ['pam_lastlog2/man/pam_lastlog2.8.adoc']
+endif