mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-10-15 15:32:51 +00:00
configure: convert compiler tests to meson, part 3
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
ed3b3f1764
commit
be7e89f63f
87
configure
vendored
87
configure
vendored
|
@ -4293,20 +4293,6 @@ if test "$fortify_source" != "no"; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
###############################################
|
|
||||||
# Check if copy_file_range is provided by glibc
|
|
||||||
have_copy_file_range=no
|
|
||||||
cat > $TMPC << EOF
|
|
||||||
#include <unistd.h>
|
|
||||||
int main(void) {
|
|
||||||
copy_file_range(0, NULL, 0, NULL, 0, 0);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
if compile_prog "" "" ; then
|
|
||||||
have_copy_file_range=yes
|
|
||||||
fi
|
|
||||||
|
|
||||||
##########################################
|
##########################################
|
||||||
# check if struct fsxattr is available via linux/fs.h
|
# check if struct fsxattr is available via linux/fs.h
|
||||||
|
|
||||||
|
@ -4353,19 +4339,6 @@ else
|
||||||
membarrier=no
|
membarrier=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
##########################################
|
|
||||||
# check if rtnetlink.h exists and is useful
|
|
||||||
have_rtnetlink=no
|
|
||||||
cat > $TMPC << EOF
|
|
||||||
#include <linux/rtnetlink.h>
|
|
||||||
int main(void) {
|
|
||||||
return IFLA_PROTO_DOWN;
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
if compile_prog "" "" ; then
|
|
||||||
have_rtnetlink=yes
|
|
||||||
fi
|
|
||||||
|
|
||||||
##########################################
|
##########################################
|
||||||
# check for usable AF_VSOCK environment
|
# check for usable AF_VSOCK environment
|
||||||
have_af_vsock=no
|
have_af_vsock=no
|
||||||
|
@ -4419,49 +4392,6 @@ then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
#################################################
|
|
||||||
# check for sysmacros.h
|
|
||||||
|
|
||||||
have_sysmacros=no
|
|
||||||
cat > $TMPC << EOF
|
|
||||||
#include <sys/sysmacros.h>
|
|
||||||
int main(void) {
|
|
||||||
return makedev(0, 0);
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
if compile_prog "" "" ; then
|
|
||||||
have_sysmacros=yes
|
|
||||||
fi
|
|
||||||
|
|
||||||
##########################################
|
|
||||||
# check for utmpx.h, it is missing e.g. on OpenBSD
|
|
||||||
|
|
||||||
have_utmpx=no
|
|
||||||
cat > $TMPC << EOF
|
|
||||||
#include <utmpx.h>
|
|
||||||
struct utmpx user_info;
|
|
||||||
int main(void) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
if compile_prog "" "" ; then
|
|
||||||
have_utmpx=yes
|
|
||||||
fi
|
|
||||||
|
|
||||||
##########################################
|
|
||||||
# check for getrandom()
|
|
||||||
|
|
||||||
have_getrandom=no
|
|
||||||
cat > $TMPC << EOF
|
|
||||||
#include <sys/random.h>
|
|
||||||
int main(void) {
|
|
||||||
return getrandom(0, 0, GRND_NONBLOCK);
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
if compile_prog "" "" ; then
|
|
||||||
have_getrandom=yes
|
|
||||||
fi
|
|
||||||
|
|
||||||
##########################################
|
##########################################
|
||||||
# checks for sanitizers
|
# checks for sanitizers
|
||||||
|
|
||||||
|
@ -4944,9 +4874,6 @@ echo "CONFIG_TLS_PRIORITY=\"$tls_priority\"" >> $config_host_mak
|
||||||
if test "$have_fsxattr" = "yes" ; then
|
if test "$have_fsxattr" = "yes" ; then
|
||||||
echo "HAVE_FSXATTR=y" >> $config_host_mak
|
echo "HAVE_FSXATTR=y" >> $config_host_mak
|
||||||
fi
|
fi
|
||||||
if test "$have_copy_file_range" = "yes" ; then
|
|
||||||
echo "HAVE_COPY_FILE_RANGE=y" >> $config_host_mak
|
|
||||||
fi
|
|
||||||
if test "$xen" = "enabled" ; then
|
if test "$xen" = "enabled" ; then
|
||||||
echo "CONFIG_XEN_BACKEND=y" >> $config_host_mak
|
echo "CONFIG_XEN_BACKEND=y" >> $config_host_mak
|
||||||
echo "CONFIG_XEN_CTRL_INTERFACE_VERSION=$xen_ctrl_version" >> $config_host_mak
|
echo "CONFIG_XEN_CTRL_INTERFACE_VERSION=$xen_ctrl_version" >> $config_host_mak
|
||||||
|
@ -5182,10 +5109,6 @@ if test "$pvrdma" = "yes" ; then
|
||||||
echo "CONFIG_PVRDMA=y" >> $config_host_mak
|
echo "CONFIG_PVRDMA=y" >> $config_host_mak
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$have_rtnetlink" = "yes" ; then
|
|
||||||
echo "CONFIG_RTNETLINK=y" >> $config_host_mak
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$replication" = "yes" ; then
|
if test "$replication" = "yes" ; then
|
||||||
echo "CONFIG_REPLICATION=y" >> $config_host_mak
|
echo "CONFIG_REPLICATION=y" >> $config_host_mak
|
||||||
fi
|
fi
|
||||||
|
@ -5194,16 +5117,6 @@ if test "$have_af_vsock" = "yes" ; then
|
||||||
echo "CONFIG_AF_VSOCK=y" >> $config_host_mak
|
echo "CONFIG_AF_VSOCK=y" >> $config_host_mak
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$have_sysmacros" = "yes" ; then
|
|
||||||
echo "CONFIG_SYSMACROS=y" >> $config_host_mak
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$have_utmpx" = "yes" ; then
|
|
||||||
echo "HAVE_UTMPX=y" >> $config_host_mak
|
|
||||||
fi
|
|
||||||
if test "$have_getrandom" = "yes" ; then
|
|
||||||
echo "CONFIG_GETRANDOM=y" >> $config_host_mak
|
|
||||||
fi
|
|
||||||
if test "$debug_mutex" = "yes" ; then
|
if test "$debug_mutex" = "yes" ; then
|
||||||
echo "CONFIG_DEBUG_MUTEX=y" >> $config_host_mak
|
echo "CONFIG_DEBUG_MUTEX=y" >> $config_host_mak
|
||||||
fi
|
fi
|
||||||
|
|
10
meson.build
10
meson.build
|
@ -1280,6 +1280,7 @@ config_host_data.set('CONFIG_SETNS', cc.has_function('setns') and cc.has_functio
|
||||||
config_host_data.set('CONFIG_SYNCFS', cc.has_function('syncfs'))
|
config_host_data.set('CONFIG_SYNCFS', cc.has_function('syncfs'))
|
||||||
config_host_data.set('CONFIG_SYNC_FILE_RANGE', cc.has_function('sync_file_range'))
|
config_host_data.set('CONFIG_SYNC_FILE_RANGE', cc.has_function('sync_file_range'))
|
||||||
config_host_data.set('CONFIG_TIMERFD', cc.has_function('timerfd_create'))
|
config_host_data.set('CONFIG_TIMERFD', cc.has_function('timerfd_create'))
|
||||||
|
config_host_data.set('HAVE_COPY_FILE_RANGE', cc.has_function('copy_file_range'))
|
||||||
config_host_data.set('HAVE_OPENPTY', cc.has_function('openpty', dependencies: util))
|
config_host_data.set('HAVE_OPENPTY', cc.has_function('openpty', dependencies: util))
|
||||||
config_host_data.set('HAVE_STRCHRNUL', cc.has_function('strchrnul'))
|
config_host_data.set('HAVE_STRCHRNUL', cc.has_function('strchrnul'))
|
||||||
config_host_data.set('HAVE_SYSTEM_FUNCTION', cc.has_function('system', prefix: '#include <stdlib.h>'))
|
config_host_data.set('HAVE_SYSTEM_FUNCTION', cc.has_function('system', prefix: '#include <stdlib.h>'))
|
||||||
|
@ -1297,12 +1298,21 @@ config_host_data.set('CONFIG_FALLOCATE_ZERO_RANGE',
|
||||||
config_host_data.set('CONFIG_FIEMAP',
|
config_host_data.set('CONFIG_FIEMAP',
|
||||||
cc.has_header('linux/fiemap.h') and
|
cc.has_header('linux/fiemap.h') and
|
||||||
cc.has_header_symbol('linux/fs.h', 'FS_IOC_FIEMAP'))
|
cc.has_header_symbol('linux/fs.h', 'FS_IOC_FIEMAP'))
|
||||||
|
config_host_data.set('CONFIG_GETRANDOM',
|
||||||
|
cc.has_function('getrandom') and
|
||||||
|
cc.has_header_symbol('sys/random.h', 'GRND_NONBLOCK'))
|
||||||
config_host_data.set('CONFIG_MACHINE_BSWAP_H',
|
config_host_data.set('CONFIG_MACHINE_BSWAP_H',
|
||||||
cc.has_header_symbol('machine/bswap.h', 'bswap32',
|
cc.has_header_symbol('machine/bswap.h', 'bswap32',
|
||||||
prefix: '''#include <sys/endian.h>
|
prefix: '''#include <sys/endian.h>
|
||||||
#include <sys/types.h>'''))
|
#include <sys/types.h>'''))
|
||||||
config_host_data.set('CONFIG_PRCTL_PR_SET_TIMERSLACK',
|
config_host_data.set('CONFIG_PRCTL_PR_SET_TIMERSLACK',
|
||||||
cc.has_header_symbol('sys/prctl.h', 'PR_SET_TIMERSLACK'))
|
cc.has_header_symbol('sys/prctl.h', 'PR_SET_TIMERSLACK'))
|
||||||
|
config_host_data.set('CONFIG_RTNETLINK',
|
||||||
|
cc.has_header_symbol('linux/rtnetlink.h', 'IFLA_PROTO_DOWN'))
|
||||||
|
config_host_data.set('CONFIG_SYSMACROS',
|
||||||
|
cc.has_header_symbol('sys/sysmacros.h', 'makedev'))
|
||||||
|
config_host_data.set('HAVE_UTMPX',
|
||||||
|
cc.has_header_symbol('utmpx.h', 'struct utmpx'))
|
||||||
|
|
||||||
# has_member
|
# has_member
|
||||||
config_host_data.set('HAVE_SIGEV_NOTIFY_THREAD_ID',
|
config_host_data.set('HAVE_SIGEV_NOTIFY_THREAD_ID',
|
||||||
|
|
Loading…
Reference in a new issue