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

index 5fb7e8a0ff259a4ec2053a38c238e9db6332fefb..aa4ed8b81abba1389237ca50c5d5bfdf9363483d 100644 (file)
@@ -1636,16 +1636,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 f14c9352223ebbc4dd2065215b9177d8fd329b65..8a11cd8e1d2386bb8b1db747634031297e074b0c 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',