From: Jordan Williams Date: Wed, 17 Apr 2024 16:13:59 +0000 (-0500) Subject: meson: Add build-dmesg option X-Git-Tag: v2.42-start~389^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=73f3e2ad6e00c93e9a0c7ed8bdb4eb63ac5ebdad;p=thirdparty%2Futil-linux.git meson: Add build-dmesg option Require the sys/klog.h header to exist in order to enable the feature. Signed-off-by: Jordan Williams --- diff --git a/meson.build b/meson.build index 19f11c6d4..be620758f 100644 --- a/meson.build +++ b/meson.build @@ -1535,16 +1535,18 @@ if opt and not is_disabler(exe) exes += exe manadocs += ['sys-utils/fstrim.8.adoc'] bashcompletions += ['fstrim'] -endif +endif +opt = get_option('build-dmesg').require(cc.has_header('sys/klog.h')).allowed() exe = executable( 'dmesg', dmesg_sources, include_directories : includes, link_with : [lib_common, lib_tcolors], - install : true) -if not is_disabler(exe) + install : opt, + build_by_default : opt) +if opt and not is_disabler(exe) exes += exe manadocs += ['sys-utils/dmesg.1.adoc'] bashcompletions += ['dmesg'] diff --git a/meson_options.txt b/meson_options.txt index 332f2b7ca..ca76530a9 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -139,6 +139,8 @@ option('build-tunelp', type : 'feature', description : 'build tunelp') option('build-fstrim', type : 'feature', description : 'build fstrim') +option('build-dmesg', type : 'feature', + description : 'build dmesg') option('build-kill', type : 'feature', description : 'build kill') option('build-last', type : 'feature',