aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2023-08-24 11:42:08 +0200
committerThomas Huth <thuth@redhat.com>2023-09-25 07:53:40 +0200
commitc64023b0ba677cfa6b878e82ea8e18507a597396 (patch)
treee9e7f41c10878173656d81587dc201b05895d81b /meson.build
parentb55e4b9c0525560577384adfc6d30eb0daa8d7be (diff)
meson.build: Make keyutils independent from keyring
Commit 0db0fbb5cf ("Add conditional dependency for libkeyutils") tried to provide a possibility for the user to disable keyutils if not required by makeing it depend on the keyring feature. This looked reasonable at a first glance (the unit test in tests/unit/ needs both), but the condition in meson.build fails if the feature is meant to be detected automatically, and there is also another spot in backends/meson.build where keyutils is used independently from keyring. So let's remove the dependency on keyring again and introduce a proper meson build option instead. Cc: qemu-stable@nongnu.org Fixes: 0db0fbb5cf ("Add conditional dependency for libkeyutils") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1842 Message-ID: <20230824094208.255279-1-thuth@redhat.com> Reviewed-by: "Daniel P. Berrangé" <berrange@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build6
1 files changed, 4 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index f426861d90..5139db2ff7 100644
--- a/meson.build
+++ b/meson.build
@@ -1763,8 +1763,9 @@ if gnutls.found()
method: 'pkg-config')
endif
keyutils = not_found
-if get_option('keyring').enabled()
- keyutils = dependency('libkeyutils', required: false, method: 'pkg-config')
+if not get_option('libkeyutils').auto() or have_block
+ keyutils = dependency('libkeyutils', required: get_option('libkeyutils'),
+ method: 'pkg-config')
endif
has_gettid = cc.has_function('gettid')
@@ -4229,6 +4230,7 @@ endif
summary_info += {'AF_ALG support': have_afalg}
summary_info += {'rng-none': get_option('rng_none')}
summary_info += {'Linux keyring': have_keyring}
+summary_info += {'Linux keyutils': keyutils}
summary(summary_info, bool_yn: true, section: 'Crypto')
# UI