]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
meson: Add build-ldattach option
authorJordan Williams <jordan@jwillikers.com>
Mon, 22 Apr 2024 13:57:40 +0000 (08:57 -0500)
committerJordan Williams <jordan@jwillikers.com>
Thu, 25 Apr 2024 12:30:54 +0000 (07:30 -0500)
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
(cherry picked from commit 75637b8813f593225fa69b4f963c9bfd16daefc9)

meson.build
meson_options.txt

index 0fb11089327829fb4910e105c9495caf344f68b9..3f0694392beaedc9de5aa77775c9f6c5451b6f42 100644 (file)
@@ -1625,16 +1625,20 @@ if opt and not is_disabler(exe)
   manadocs += ['sys-utils/blkpr.8.adoc']
 endif
 
+opt = get_option('build-ldattach').require(cc.has_header('linux/if.h')).allowed()
 exe = executable(
   'ldattach',
   ldattach_sources,
   include_directories : includes,
   link_with : [lib_common],
   install_dir : usrsbin_exec_dir,
-  install : true)
-exes += exe
-manadocs += ['sys-utils/ldattach.8.adoc']
-bashcompletions += ['ldattach']
+  install : opt,
+  build_by_default : opt)
+if opt and not is_disabler(exe)
+  exes += exe
+  manadocs += ['sys-utils/ldattach.8.adoc']
+  bashcompletions += ['ldattach']
+endif
 
 exe = executable(
   'rtcwake',
index c91a1cbfde75a09167d7450457038d263085d80b..87da0fd2e8e42137ba9658bd201b49af4505bcd5 100644 (file)
@@ -149,6 +149,8 @@ option('build-blkzone', type : 'feature',
        description : 'build blkzone')
 option('build-blkpr', type : 'feature',
        description : 'build blkpr')
+option('build-ldattach', type : 'feature',
+       description : 'build ldattach')
 option('build-kill', type : 'feature',
        description : 'build kill')
 option('build-last', type : 'feature',