summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorPaolo Bonzini2020-09-16 18:07:29 +0200
committerPaolo Bonzini2020-09-30 19:11:35 +0200
commit6ec0e15d95da4e80bc890933e3e5bc11f6b54118 (patch)
treea8be05439e7fbc9c574196fca1537328c051742e /configure
parentmeson: move libudev test (diff)
downloadqemu-6ec0e15d95da4e80bc890933e3e5bc11f6b54118.tar.gz
qemu-6ec0e15d95da4e80bc890933e3e5bc11f6b54118.tar.xz
qemu-6ec0e15d95da4e80bc890933e3e5bc11f6b54118.zip
meson: move libmpathpersist test
This is the first compiler/linker test that has been moved to Meson. Add more section headings to keep things clearer. This also fixes static linking to libmpathpersist, which has a dependency on libmultipath but no pkg-config file to describe it. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure77
1 files changed, 4 insertions, 73 deletions
diff --git a/configure b/configure
index 6f2599f99f..aade6eb285 100755
--- a/configure
+++ b/configure
@@ -403,7 +403,7 @@ netmap="no"
sdl="auto"
sdl_image="auto"
virtfs=""
-mpath=""
+mpath="auto"
vnc="enabled"
sparse="no"
vde=""
@@ -1116,9 +1116,9 @@ for opt do
;;
--enable-virtfs) virtfs="yes"
;;
- --disable-mpath) mpath="no"
+ --disable-mpath) mpath="disabled"
;;
- --enable-mpath) mpath="yes"
+ --enable-mpath) mpath="enabled"
;;
--disable-vnc) vnc="disabled"
;;
@@ -3853,57 +3853,6 @@ if test "$modules" = yes; then
fi
##########################################
-# libmpathpersist probe
-
-if test "$mpath" != "no" ; then
- # probe for the new API
- cat > $TMPC <<EOF
-#include <libudev.h>
-#include <mpath_persist.h>
-unsigned mpath_mx_alloc_len = 1024;
-int logsink;
-static struct config *multipath_conf;
-extern struct udev *udev;
-extern struct config *get_multipath_config(void);
-extern void put_multipath_config(struct config *conf);
-struct udev *udev;
-struct config *get_multipath_config(void) { return multipath_conf; }
-void put_multipath_config(struct config *conf) { }
-
-int main(void) {
- udev = udev_new();
- multipath_conf = mpath_lib_init();
- return 0;
-}
-EOF
- if compile_prog "" "-ludev -lmultipath -lmpathpersist" ; then
- mpathpersist=yes
- mpathpersist_new_api=yes
- else
- # probe for the old API
- cat > $TMPC <<EOF
-#include <libudev.h>
-#include <mpath_persist.h>
-unsigned mpath_mx_alloc_len = 1024;
-int logsink;
-int main(void) {
- struct udev *udev = udev_new();
- mpath_lib_init(udev);
- return 0;
-}
-EOF
- if compile_prog "" "-ludev -lmultipath -lmpathpersist" ; then
- mpathpersist=yes
- mpathpersist_new_api=no
- else
- mpathpersist=no
- fi
- fi
-else
- mpathpersist=no
-fi
-
-##########################################
# pthread probe
PTHREADLIBS_LIST="-pthread -lpthread -lpthreadGC2"
@@ -6337,23 +6286,11 @@ if test "$softmmu" = yes ; then
fi
virtfs=no
fi
- if test "$mpath" != no && test "$mpathpersist" = yes ; then
- mpath=yes
- else
- if test "$mpath" = yes; then
- error_exit "Multipath requires libmpathpersist devel"
- fi
- mpath=no
- fi
else
if test "$virtfs" = yes; then
error_exit "VirtFS is supported only on Linux"
fi
virtfs=no
- if test "$mpath" = yes; then
- error_exit "Multipath is supported only on Linux"
- fi
- mpath=no
fi
fi
@@ -6894,12 +6831,6 @@ fi
if test "$virtfs" = "yes" ; then
echo "CONFIG_VIRTFS=y" >> $config_host_mak
fi
-if test "$mpath" = "yes" ; then
- echo "CONFIG_MPATH=y" >> $config_host_mak
- if test "$mpathpersist_new_api" = "yes"; then
- echo "CONFIG_MPATH_NEW_API=y" >> $config_host_mak
- fi
-fi
if test "$vhost_scsi" = "yes" ; then
echo "CONFIG_VHOST_SCSI=y" >> $config_host_mak
fi
@@ -7988,7 +7919,7 @@ NINJA=${ninja:-$PWD/ninjatool} $meson setup \
-Dstrip=$(if test "$strip_opt" = yes; then echo true; else echo false; fi) \
-Db_pie=$(if test "$pie" = yes; then echo true; else echo false; fi) \
-Db_coverage=$(if test "$gcov" = yes; then echo true; else echo false; fi) \
- -Dsdl=$sdl -Dsdl_image=$sdl_image \
+ -Dmpath=$mpath -Dsdl=$sdl -Dsdl_image=$sdl_image \
-Dvnc=$vnc -Dvnc_sasl=$vnc_sasl -Dvnc_jpeg=$vnc_jpeg -Dvnc_png=$vnc_png \
-Dgettext=$gettext -Dxkbcommon=$xkbcommon -Du2f=$u2f\
$cross_arg \