]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
meson: Add build-lsclocks option
authorJordan Williams <jordan@jwillikers.com>
Tue, 23 Apr 2024 12:45:24 +0000 (07:45 -0500)
committerJordan Williams <jordan@jwillikers.com>
Thu, 25 Apr 2024 12:31:43 +0000 (07:31 -0500)
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
(cherry picked from commit 5873f36e0ebf40121cbe33e7c632193433b8d085)

meson.build
meson_options.txt

index 04ed1218860abcbcc41dd79a417126308650547e..af7ccf78837548f82fda202fd20bab22b2ae00c1 100644 (file)
@@ -1643,7 +1643,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,
@@ -3124,14 +3126,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']
index 9f09f3220cbd671884af539f9465dfa4a83240bd..fedda65e508b9dad50d72c582b474508e3080c83 100644 (file)
@@ -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',