]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
meson: gate liblastlog2 on lastlog.h
authorThomas Weißschuh <thomas@t-8ch.de>
Wed, 22 Apr 2026 20:51:53 +0000 (22:51 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Sun, 3 May 2026 14:30:31 +0000 (16:30 +0200)
The target needs this header, encode this in the build system.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
meson.build

index d61fdcf99d2fb247bfc2618040d278a150594597..52ebded3dd6eaf7a4a9fc5d1b644381d01456f8d 100644 (file)
@@ -192,7 +192,10 @@ conf.set('HAVE_LIBUUID', build_libuuid ? 1 : false)
 summary('libuuid', build_libuuid ? 'enabled' : 'disabled', section : 'components')
 
 lib_sqlite3 = dependency('sqlite3', required : get_option('build-liblastlog2'))
-build_liblastlog2 = get_option('build-liblastlog2').require(lib_sqlite3.found()).allowed()
+build_liblastlog2 = get_option('build-liblastlog2') \
+                    .require(lib_sqlite3.found()) \
+                    .require(conf.get('HAVE_LASTLOG_H').to_string() == '1') \
+                    .allowed()
 conf.set('HAVE_LIBLASTLOG2', build_liblastlog2 ? 1 : false)
 summary('liblastlog2', build_liblastlog2 ? 'enabled' : 'disabled', section : 'components')