]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
meson: create dedicated config for pam_lastlog2
authorThomas Weißschuh <thomas@t-8ch.de>
Fri, 2 Feb 2024 12:48:28 +0000 (13:48 +0100)
committerThomas Weißschuh <thomas@t-8ch.de>
Fri, 2 Feb 2024 13:03:39 +0000 (14:03 +0100)
meson.build
meson_options.txt
pam_lastlog2/meson.build

index d9d29a46264104a5381ed18635e8c99984a3d4fb..5a3806cf8e9f0803a7aef0b7cdd0f5b3c60e1147 100644 (file)
@@ -197,6 +197,7 @@ headers = '''
         security/openpam.h
         security/pam_appl.h
         security/pam_misc.h
+        security/pam_modules.h
         sys/disk.h
         sys/disklabel.h
         sys/endian.h
index b3cdc2dd3e9ba31bc2f49470163476184b5c1b4e..fe2ae4a41d031b8361ff8ee252ba916f87fc8732 100644 (file)
@@ -39,6 +39,8 @@ option('build-libuuid', type : 'feature',
        description : 'build libuuid and uuid utilities')
 option('build-liblastlog2', type : 'feature',
        description : 'build liblastlog2 and lastlog2 utilities')
+option('build-pam-lastlog2', type : 'feature',
+       description : 'build PAM lastlog2 module')
 option('build-libmount', type : 'feature',
        description : 'build libmount')
 option('build-libsmartcols', type : 'feature',
index ae768dad1094e5fa353fe171906b3bed08446734..d662e1b3f215d4e78610fd074db67bd8a0920fe7 100644 (file)
@@ -1,3 +1,9 @@
+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 = '''
@@ -9,7 +15,7 @@ if pamlibdir == ''
         pamlibdir = get_option('libdir') / 'security'
 endif
 
-if build_liblastlog2
+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)