summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2017-08-03 11:07:46 +0200
committerMichael S. Tsirkin <mst@redhat.com>2017-08-03 15:55:41 +0300
commite6a74868d92f858ac33915b6772999d7de2fd288 (patch)
treec64cbf17d6fa69e46da4f8753e8d0e7c558901c3 /configure
parentaaaec6acad7cf97372d48c1b09126a09697519c8 (diff)
downloadqemu-e6a74868d92f858ac33915b6772999d7de2fd288.tar.gz
build-sys: add --disable-vhost-user
Learn to compile out vhost-user (net, scsi & upcoming users). Keep it enabled by default on non-win32, that is assumed to be POSIX. Fail if trying to enable it on win32. When trying to make a vhost-user netdev, it gives the following error: -netdev vhost-user,id=foo,chardev=chr-test: Parameter 'type' expects a netdev backend type And similar error with the HMP/QMP monitors. While at it, rename CONFIG_VHOST_NET_TEST CONFIG_VHOST_USER_NET_TEST since it's a vhost-user specific variable. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure28
1 files changed, 26 insertions, 2 deletions
diff --git a/configure b/configure
index 987f59ba88..dd73cce62f 100755
--- a/configure
+++ b/configure
@@ -306,6 +306,7 @@ tcg="yes"
vhost_net="no"
vhost_scsi="no"
vhost_vsock="no"
+vhost_user=""
kvm="no"
hax="no"
rdma=""
@@ -1282,6 +1283,14 @@ for opt do
;;
--enable-vxhs) vxhs="yes"
;;
+ --disable-vhost-user) vhost_user="no"
+ ;;
+ --enable-vhost-user)
+ vhost_user="yes"
+ if test "$mingw32" = "yes"; then
+ error_exit "vhost-user isn't available on win32"
+ fi
+ ;;
*)
echo "ERROR: unknown option $opt"
echo "Try '$0 --help' for more information"
@@ -1290,6 +1299,14 @@ for opt do
esac
done
+if test "$vhost_user" = ""; then
+ if test "$mingw32" = "yes"; then
+ vhost_user="no"
+ else
+ vhost_user="yes"
+ fi
+fi
+
case "$cpu" in
ppc)
CPU_CFLAGS="-m32"
@@ -1518,6 +1535,7 @@ disabled with --disable-FEATURE, default is enabled if available:
tools build qemu-io, qemu-nbd and qemu-image tools
vxhs Veritas HyperScale vDisk backend support
crypto-afalg Linux AF_ALG crypto backend driver
+ vhost-user vhost-user support
NOTE: The object files are built at the place where configure is launched
EOF
@@ -5348,6 +5366,7 @@ echo "libcap-ng support $cap_ng"
echo "vhost-net support $vhost_net"
echo "vhost-scsi support $vhost_scsi"
echo "vhost-vsock support $vhost_vsock"
+echo "vhost-user support $vhost_user"
echo "Trace backends $trace_backends"
if have_backend "simple"; then
echo "Trace output file $trace_file-<pid>"
@@ -5757,12 +5776,15 @@ fi
if test "$vhost_scsi" = "yes" ; then
echo "CONFIG_VHOST_SCSI=y" >> $config_host_mak
fi
-if test "$vhost_net" = "yes" ; then
+if test "$vhost_net" = "yes" -a "$vhost_user" = "yes"; then
echo "CONFIG_VHOST_NET_USED=y" >> $config_host_mak
fi
if test "$vhost_vsock" = "yes" ; then
echo "CONFIG_VHOST_VSOCK=y" >> $config_host_mak
fi
+if test "$vhost_user" = "yes" ; then
+ echo "CONFIG_VHOST_USER=y" >> $config_host_mak
+fi
if test "$blobs" = "yes" ; then
echo "INSTALL_BLOBS=yes" >> $config_host_mak
fi
@@ -6358,7 +6380,9 @@ if supported_kvm_target $target; then
echo "CONFIG_KVM=y" >> $config_target_mak
if test "$vhost_net" = "yes" ; then
echo "CONFIG_VHOST_NET=y" >> $config_target_mak
- echo "CONFIG_VHOST_NET_TEST_$target_name=y" >> $config_host_mak
+ if test "$vhost_user" = "yes" ; then
+ echo "CONFIG_VHOST_USER_NET_TEST_$target_name=y" >> $config_host_mak
+ fi
fi
fi
if supported_hax_target $target; then