meson, configure: move keyctl test to meson

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2022-04-20 17:33:42 +02:00
parent 3730a7341f
commit 2edd2c04c2
5 changed files with 22 additions and 46 deletions

44
configure vendored
View file

@ -322,7 +322,6 @@ trace_file="trace"
coroutine=""
tls_priority="NORMAL"
plugins="$default_feature"
secret_keyring="$default_feature"
meson=""
meson_args=""
ninja=""
@ -1009,10 +1008,6 @@ for opt do
;;
--gdb=*) gdb_bin="$optarg"
;;
--enable-keyring) secret_keyring="yes"
;;
--disable-keyring) secret_keyring="no"
;;
--enable-gio) gio=yes
;;
--disable-gio) gio=no
@ -2440,41 +2435,6 @@ case "$slirp" in
;;
esac
##########################################
# check for usable __NR_keyctl syscall
if test "$linux" = "yes" ; then
have_keyring=no
cat > $TMPC << EOF
#include <errno.h>
#include <asm/unistd.h>
#include <linux/keyctl.h>
#include <unistd.h>
int main(void) {
return syscall(__NR_keyctl, KEYCTL_READ, 0, NULL, NULL, 0);
}
EOF
if compile_prog "" "" ; then
have_keyring=yes
fi
fi
if test "$secret_keyring" != "no"
then
if test "$have_keyring" = "yes"
then
secret_keyring=yes
else
if test "$secret_keyring" = "yes"
then
error_exit "syscall __NR_keyctl requested, \
but not implemented on your system"
else
secret_keyring=no
fi
fi
fi
##########################################
# End of CC checks
# After here, no more $cc or $ld runs
@ -2760,10 +2720,6 @@ if test -n "$gdb_bin"; then
fi
fi
if test "$secret_keyring" = "yes" ; then
echo "CONFIG_SECRET_KEYRING=y" >> $config_host_mak
fi
echo "ROMS=$roms" >> $config_host_mak
echo "MAKE=$make" >> $config_host_mak
echo "PYTHON=$python" >> $config_host_mak