aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2020-11-10 17:11:19 +0000
committerMichael S. Tsirkin <mst@redhat.com>2020-11-12 09:19:40 -0500
commite5e856c1eb4b85fe96472cf7aed48e336fe5ce74 (patch)
tree5546b79ce042f2e17a2c0a9dbd052d90b533ec60 /configure
parent3009edff8192991293fe9e2b50b0d90db83c4a89 (diff)
downloadqemu-e5e856c1eb4b85fe96472cf7aed48e336fe5ce74.zip
qemu-e5e856c1eb4b85fe96472cf7aed48e336fe5ce74.tar.gz
qemu-e5e856c1eb4b85fe96472cf7aed48e336fe5ce74.tar.bz2
meson: move vhost_user_blk_server to meson.build
The --enable/disable-vhost-user-blk-server options were implemented in ./configure. There has been confusion about them and part of the problem is that the shell syntax used for setting the default value is not easy to read. Move the option over to meson where the conditions are easier to understand: have_vhost_user_blk_server = (targetos == 'linux') if get_option('vhost_user_blk_server').enabled() if targetos != 'linux' error('vhost_user_blk_server requires linux') endif elif get_option('vhost_user_blk_server').disabled() or not have_system have_vhost_user_blk_server = false endif This patch does not change behavior. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20201110171121.1265142-2-stefanha@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure16
1 files changed, 4 insertions, 12 deletions
diff --git a/configure b/configure
index 4cef321..516f28a 100755
--- a/configure
+++ b/configure
@@ -329,7 +329,7 @@ vhost_crypto=""
vhost_scsi=""
vhost_vsock=""
vhost_user=""
-vhost_user_blk_server=""
+vhost_user_blk_server="auto"
vhost_user_fs=""
kvm="auto"
hax="auto"
@@ -1247,9 +1247,9 @@ for opt do
;;
--enable-vhost-vsock) vhost_vsock="yes"
;;
- --disable-vhost-user-blk-server) vhost_user_blk_server="no"
+ --disable-vhost-user-blk-server) vhost_user_blk_server="disabled"
;;
- --enable-vhost-user-blk-server) vhost_user_blk_server="yes"
+ --enable-vhost-user-blk-server) vhost_user_blk_server="enabled"
;;
--disable-vhost-user-fs) vhost_user_fs="no"
;;
@@ -2390,12 +2390,6 @@ if test "$vhost_net" = ""; then
test "$vhost_kernel" = "yes" && vhost_net=yes
fi
-# libvhost-user is Linux-only
-test "$vhost_user_blk_server" = "" && vhost_user_blk_server=$linux
-if test "$vhost_user_blk_server" = "yes" && test "$linux" = "no"; then
- error_exit "--enable-vhost-user-blk-server is only available on Linux"
-fi
-
##########################################
# pkg-config probe
@@ -6289,9 +6283,6 @@ fi
if test "$vhost_vdpa" = "yes" ; then
echo "CONFIG_VHOST_VDPA=y" >> $config_host_mak
fi
-if test "$vhost_user_blk_server" = "yes" ; then
- echo "CONFIG_VHOST_USER_BLK_SERVER=y" >> $config_host_mak
-fi
if test "$vhost_user_fs" = "yes" ; then
echo "CONFIG_VHOST_USER_FS=y" >> $config_host_mak
fi
@@ -7012,6 +7003,7 @@ NINJA=$ninja $meson setup \
-Dcapstone=$capstone -Dslirp=$slirp -Dfdt=$fdt \
-Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\
-Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \
+ -Dvhost_user_blk_server=$vhost_user_blk_server \
$cross_arg \
"$PWD" "$source_path"