libxml2=""
docker="no"
debug_mutex="no"
+libpmem=""
# cross compilers defaults, can be overridden with --cross-cc-ARCH
cross_cc_aarch64="aarch64-linux-gnu-gcc"
;;
--disable-debug-mutex) debug_mutex=no
;;
+ --enable-libpmem) libpmem=yes
+ ;;
+ --disable-libpmem) libpmem=no
+ ;;
*)
echo "ERROR: unknown option $opt"
echo "Try '$0 --help' for more information"
vhost-user vhost-user support
capstone capstone disassembler support
debug-mutex mutex debugging support
+ libpmem libpmem support
NOTE: The object files are built at the place where configure is launched
EOF
##########################################
# libseccomp check
+libseccomp_minver="2.2.0"
if test "$seccomp" != "no" ; then
case "$cpu" in
- i386|x86_64)
- libseccomp_minver="2.1.0"
- ;;
- mips)
- libseccomp_minver="2.2.0"
+ i386|x86_64|mips)
;;
arm|aarch64)
libseccomp_minver="2.2.3"
# libmpathpersist probe
if test "$mpath" != "no" ; then
+ # probe for the new API
cat > $TMPC <<EOF
#include <libudev.h>
#include <mpath_persist.h>
EOF
if compile_prog "" "-ludev -lmultipath -lmpathpersist" ; then
mpathpersist=yes
+ mpathpersist_new_api=yes
else
- mpathpersist=no
+ # 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
docker=$($python $source_path/tests/docker/docker.py probe)
fi
+##########################################
+# check for libpmem
+
+if test "$libpmem" != "no"; then
+ if $pkg_config --exists "libpmem"; then
+ libpmem="yes"
+ libpmem_libs=$($pkg_config --libs libpmem)
+ libpmem_cflags=$($pkg_config --cflags libpmem)
+ libs_softmmu="$libs_softmmu $libpmem_libs"
+ QEMU_CFLAGS="$QEMU_CFLAGS $libpmem_cflags"
+ else
+ if test "$libpmem" = "yes" ; then
+ feature_not_found "libpmem" "Install nvml or pmdk"
+ fi
+ libpmem="no"
+ fi
+fi
+
##########################################
# End of CC checks
# After here, no more $cc or $ld runs
echo "VxHS block device $vxhs"
echo "capstone $capstone"
echo "docker $docker"
+echo "libpmem support $libpmem"
if test "$sdl_too_old" = "yes"; then
echo "-> Your SDL version is too old - please upgrade to have SDL support"
echo "CONFIG_BLUEZ=y" >> $config_host_mak
echo "BLUEZ_CFLAGS=$bluez_cflags" >> $config_host_mak
fi
-if test "$glib_subprocess" = "yes" ; then
- echo "CONFIG_HAS_GLIB_SUBPROCESS_TESTS=y" >> $config_host_mak
-fi
if test "$gtk" = "yes" ; then
echo "CONFIG_GTK=m" >> $config_host_mak
echo "CONFIG_GTKABI=$gtkabi" >> $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
echo "VXHS_LIBS=$vxhs_libs" >> $config_host_mak
fi
+if test "$libpmem" = "yes" ; then
+ echo "CONFIG_LIBPMEM=y" >> $config_host_mak
+fi
+
if test "$tcg_interpreter" = "yes"; then
QEMU_INCLUDES="-iquote \$(SRC_PATH)/tcg/tci $QEMU_INCLUDES"
elif test "$ARCH" = "sparc64" ; then