aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJordan Williams <jordan@jwillikers.com>2024-04-23 07:45:24 -0500
committerJordan Williams <jordan@jwillikers.com>2024-04-24 15:30:31 -0500
commit5873f36e0ebf40121cbe33e7c632193433b8d085 (patch)
treed9c17bbd0d44c49d733026ac0ae1d063b4327872
parent0f2dd62ed106af8291e91364e992bc9eb65cab55 (diff)
downloadutil-linux-5873f36e0ebf40121cbe33e7c632193433b8d085.tar.gz
meson: Add build-lsclocks option
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
-rw-r--r--meson.build10
-rw-r--r--meson_options.txt2
2 files changed, 9 insertions, 3 deletions
diff --git a/meson.build b/meson.build
index 119b35562f..06f1400f6b 100644
--- a/meson.build
+++ b/meson.build
@@ -1654,7 +1654,9 @@ if opt and not is_disabler(exe)
bashcompletions += ['ldattach']
endif
-opt = get_option('build-rtcwake').require(cc.has_header('linux/rtc.h')).allowed()
+have_linux_rtc_h = cc.has_header('linux/rtc.h')
+
+opt = get_option('build-rtcwake').require(have_linux_rtc_h).allowed()
exe = executable(
'rtcwake',
rtcwake_sources,
@@ -3185,14 +3187,16 @@ if opt and not is_disabler(exe)
bashcompletions += ['enosys']
endif
+opt = get_option('build-lsclocks').require(have_linux_rtc_h).allowed()
exe = executable(
'lsclocks',
lsclocks_sources,
include_directories : includes,
link_with : [lib_common, lib_smartcols],
install_dir : usrbin_exec_dir,
- install : true)
-if not is_disabler(exe)
+ install : opt,
+ build_by_default : opt)
+if opt and not is_disabler(exe)
exes += exe
manadocs += ['misc-utils/lsclocks.1.adoc']
bashcompletions += ['lsclocks']
diff --git a/meson_options.txt b/meson_options.txt
index 226721ad8d..e7f0513d6a 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -205,6 +205,8 @@ option('build-fadvise', type : 'feature',
description : 'build fadvise')
option('build-enosys', type : 'feature',
description : 'build enosys')
+option('build-lsclocks', type : 'feature',
+ description : 'build lsclocks')
option('build-setterm', type : 'feature',
description : 'build setterm')
option('build-schedutils', type : 'feature',