]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
meson: Add build-rtcwake option
authorJordan Williams <jordan@jwillikers.com>
Mon, 22 Apr 2024 14:03:52 +0000 (09:03 -0500)
committerJordan Williams <jordan@jwillikers.com>
Wed, 24 Apr 2024 20:30:30 +0000 (15:30 -0500)
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
meson.build
meson_options.txt

index aa4ed8b81abba1389237ca50c5d5bfdf9363483d..90c71b49e8e324640873a1b33e1969a8ffe84956 100644 (file)
@@ -1651,16 +1651,20 @@ if opt and not is_disabler(exe)
   bashcompletions += ['ldattach']
 endif
 
+opt = get_option('build-rtcwake').require(cc.has_header('linux/rtc.h')).allowed()
 exe = executable(
   'rtcwake',
   rtcwake_sources,
   include_directories : includes,
   link_with : [lib_common],
   install_dir : usrsbin_exec_dir,
-  install : true)
-exes += exe
-manadocs += ['sys-utils/rtcwake.8.adoc']
-bashcompletions += ['rtcwake']
+  install : opt,
+  build_by_default : opt)
+if opt and not is_disabler(exe)
+  exes += exe
+  manadocs += ['sys-utils/rtcwake.8.adoc']
+  bashcompletions += ['rtcwake']
+endif
 
 exe = executable(
   'setarch',
index 8a11cd8e1d2386bb8b1db747634031297e074b0c..42469fa67e671b2e3db4d1546dcd666da3abb584 100644 (file)
@@ -151,6 +151,8 @@ option('build-blkpr', type : 'feature',
        description : 'build blkpr')
 option('build-ldattach', type : 'feature',
        description : 'build ldattach')
+option('build-rtcwake', type : 'feature',
+       description : 'build rtcwake')
 option('build-kill', type : 'feature',
        description : 'build kill')
 option('build-last', type : 'feature',