aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2024-04-22 12:04:25 +0200
committerKarel Zak <kzak@redhat.com>2024-04-22 12:04:25 +0200
commit8dffefad2b95a8bfa2db426d485d122840429f95 (patch)
tree28075671383deb271535c0f50d6927c51ad0549c
parent0800bdc7626f6e46fa44614c185ff96b193e89bd (diff)
parent73f3e2ad6e00c93e9a0c7ed8bdb4eb63ac5ebdad (diff)
downloadutil-linux-8dffefad2b95a8bfa2db426d485d122840429f95.tar.gz
Merge branch 'meson-build-dmesg' of https://github.com/jwillikers/util-linux
* 'meson-build-dmesg' of https://github.com/jwillikers/util-linux: meson: Add build-dmesg option
-rw-r--r--meson.build8
-rw-r--r--meson_options.txt2
2 files changed, 7 insertions, 3 deletions
diff --git a/meson.build b/meson.build
index 876a0b2101..5b4f59b8c3 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 332f2b7ca6..ca76530a93 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',