[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 17/39] meson: move keyutils dependency check
From: |
Paolo Bonzini |
Subject: |
[PATCH 17/39] meson: move keyutils dependency check |
Date: |
Wed, 2 Sep 2020 08:58:55 -0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Since there is not minimum version specified, and it's a test-only
dependency, it's fair to depend on a version that ships with a .pc I
suppose.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20200828110734.1638685-8-marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 25 -------------------------
meson.build | 7 +++----
2 files changed, 3 insertions(+), 29 deletions(-)
diff --git a/configure b/configure
index 6a43ef6c2d..82b2211936 100755
--- a/configure
+++ b/configure
@@ -6305,28 +6305,6 @@ but not implemented on your system"
fi
fi
-##########################################
-# check for usable keyutils.h
-
-if test "$linux" = "yes" ; then
-
- have_keyutils=no
- cat > $TMPC << EOF
-#include <errno.h>
-#include <asm/unistd.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <keyutils.h>
-int main(void) {
- return request_key("user", NULL, NULL, 0);
-}
-EOF
- if compile_prog "" "-lkeyutils"; then
- have_keyutils=yes
- fi
-fi
-
-
##########################################
# End of CC checks
# After here, no more $cc or $ld runs
@@ -7510,9 +7488,6 @@ fi
if test "$secret_keyring" = "yes" ; then
echo "CONFIG_SECRET_KEYRING=y" >> $config_host_mak
- if test "$have_keyutils" = "yes" ; then
- echo "CONFIG_KEYUTILS=y" >> $config_host_mak
- fi
fi
if test "$tcg_interpreter" = "yes"; then
diff --git a/meson.build b/meson.build
index fc46273491..7c714bb49c 100644
--- a/meson.build
+++ b/meson.build
@@ -410,10 +410,8 @@ if 'CONFIG_TASN1' in config_host
tasn1 = declare_dependency(compile_args: config_host['TASN1_CFLAGS'].split(),
link_args: config_host['TASN1_LIBS'].split())
endif
-keyutils = not_found
-if 'CONFIG_KEYUTILS' in config_host
- keyutils = declare_dependency(link_args: '-lkeyutils')
-endif
+keyutils = dependency('libkeyutils', required: false,
+ method: 'pkg-config', static: enable_static)
# Create config-host.h
@@ -424,6 +422,7 @@ config_host_data.set('CONFIG_VNC_JPEG', jpeg.found())
config_host_data.set('CONFIG_VNC_PNG', png.found())
config_host_data.set('CONFIG_VNC_SASL', sasl.found())
config_host_data.set('CONFIG_XKBCOMMON', xkbcommon.found())
+config_host_data.set('CONFIG_KEYUTILS', keyutils.found())
config_host_data.set('QEMU_VERSION', '"@0@"'.format(meson.project_version()))
config_host_data.set('QEMU_VERSION_MAJOR',
meson.project_version().split('.')[0])
config_host_data.set('QEMU_VERSION_MINOR',
meson.project_version().split('.')[1])
--
2.26.2
- [PATCH 12/39] meson: declare tasn1 dependency, (continued)
- [PATCH 12/39] meson: declare tasn1 dependency, Paolo Bonzini, 2020/09/02
- [PATCH 10/39] meson: fix libqos linking, Paolo Bonzini, 2020/09/02
- [PATCH 21/39] tests: do not print benchmark output to stdout, Paolo Bonzini, 2020/09/02
- [PATCH 23/39] tests/migration/stress: remove unused exit_success, Paolo Bonzini, 2020/09/02
- [PATCH 24/39] meson: fix migration/stress compilation with glibc>=2.30, Paolo Bonzini, 2020/09/02
- [PATCH 19/39] meson: convert vhost-user-bridge, Paolo Bonzini, 2020/09/02
- [PATCH 20/39] meson: convert atomic*-bench, Paolo Bonzini, 2020/09/02
- [PATCH 13/39] meson: declare keyutils dependency, Paolo Bonzini, 2020/09/02
- [PATCH 09/39] ninjatool: use constant names for stamp files, Paolo Bonzini, 2020/09/02
- [PATCH 18/39] meson: remove old socket_scm_helper rule, Paolo Bonzini, 2020/09/02
- [PATCH 17/39] meson: move keyutils dependency check,
Paolo Bonzini <=
- [PATCH 04/39] mtest2make: hide output of successful tests, Paolo Bonzini, 2020/09/02
- [PATCH 29/39] Makefile: inline the relevant parts of rules.mak, Paolo Bonzini, 2020/09/02
- [PATCH 26/39] configure: remove dead code for in-tree builds, Paolo Bonzini, 2020/09/02
- [PATCH 31/39] configure: move C++ compiler handling to meson, Paolo Bonzini, 2020/09/02
- [PATCH 22/39] meson: convert the speed tests, Paolo Bonzini, 2020/09/02
- [PATCH 25/39] meson: convert migration/initrd-stress, Paolo Bonzini, 2020/09/02
- [PATCH 32/39] meson: keep all compiler flags detection together, Paolo Bonzini, 2020/09/02
- [PATCH 34/39] configure: remove unnecessary libm test, Paolo Bonzini, 2020/09/02
- [PATCH 39/39] docs: suggest Meson replacements for various configure functions, Paolo Bonzini, 2020/09/02
- [PATCH 36/39] meson: get glib compilation flags from GLIB_CFLAGS, Paolo Bonzini, 2020/09/02