]> 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>
Wed, 24 Apr 2024 20:30:31 +0000 (15:30 -0500)
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
meson.build
meson_options.txt

index 119b35562f85669fb12fbc5e283bb59dd3e1b227..06f1400f6ba715750edf91a8c982e2d54556bd3b 100644 (file)
@@ -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']
index 226721ad8d8a19536241f2de75b5c205e9ed58e3..e7f0513d6a0193f16043f06605650c80869e8e27 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',