]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
meson: make libcap-ng dependent on setpriv
authorRosen Penev <rosenp@gmail.com>
Mon, 2 May 2022 23:18:33 +0000 (16:18 -0700)
committerRosen Penev <rosenp@gmail.com>
Tue, 3 May 2022 00:19:08 +0000 (17:19 -0700)
Signed-off-by: Rosen Penev <rosenp@gmail.com>
meson.build

index 471f0c8d50c4444fad5c79002c9a8ab46ea80399..09479c4388fc9ac2d88142a692a8dbab3e2fb297 100644 (file)
@@ -335,7 +335,8 @@ have = cc.has_function(
 conf.set('HAVE_CRYPT_ACTIVATE_BY_SIGNED_KEY', have ? 1 : false)
 
 lib_cap_ng = dependency(
-  'libcap-ng')
+  'libcap-ng',
+  required : get_option('build-setpriv'))
 
 lib_selinux = dependency(
   'libselinux',
@@ -1745,7 +1746,7 @@ if opt and not is_disabler(exe)
   exes += exe
 endif
 
-opt = not get_option('build-setpriv').disabled()
+opt = not get_option('build-setpriv').disabled() and lib_cap_ng.found()
 exe = executable(
   'setpriv',
   setpriv_sources,