if test -e "$source_path/.git"
then
+ git_update=yes
git_submodules="ui/keycodemapdb"
else
+ git_update=no
git_submodules=""
fi
+git="git"
# Don't accept a target_list environment variable.
unset target_list
cpuid_h="no"
avx2_opt="no"
zlib="yes"
+capstone=""
lzo=""
snappy=""
bzip2=""
cpp="${CPP-$cc -E}"
objcopy="${OBJCOPY-${cross_prefix}objcopy}"
ld="${LD-${cross_prefix}ld}"
+ranlib="${RANLIB-${cross_prefix}ranlib}"
nm="${NM-${cross_prefix}nm}"
strip="${STRIP-${cross_prefix}strip}"
windres="${WINDRES-${cross_prefix}windres}"
sysconfdir="\${prefix}"
local_statedir=
confsuffix=""
- libs_qga="-lws2_32 -lwinmm -lpowrprof -lwtsapi32 -liphlpapi -lnetapi32 $libs_qga"
+ libs_qga="-lws2_32 -lwinmm -lpowrprof -lwtsapi32 -lwininet -liphlpapi -lnetapi32 $libs_qga"
fi
werror=""
error_exit "vhost-user isn't available on win32"
fi
;;
+ --disable-capstone) capstone="no"
+ ;;
+ --enable-capstone) capstone="yes"
+ ;;
+ --enable-capstone=git) capstone="git"
+ ;;
+ --enable-capstone=system) capstone="system"
+ ;;
+ --with-git=*) git="$optarg"
+ ;;
+ --enable-git-update) git_update=yes
+ ;;
+ --disable-git-update) git_update=no
+ ;;
*)
echo "ERROR: unknown option $opt"
echo "Try '$0 --help' for more information"
vxhs Veritas HyperScale vDisk backend support
crypto-afalg Linux AF_ALG crypto backend driver
vhost-user vhost-user support
+ capstone capstone disassembler support
NOTE: The object files are built at the place where configure is launched
EOF
fi
fi
+# Disable -Wmissing-braces on older compilers that warn even for
+# the "universal" C zero initializer {0}.
+cat > $TMPC << EOF
+struct {
+ int a[2];
+} x = {0};
+EOF
+if compile_object "-Werror" "" ; then
+ :
+else
+ QEMU_CFLAGS="$QEMU_CFLAGS -Wno-missing-braces"
+fi
+
# Workaround for http://gcc.gnu.org/PR55489. Happens with -fPIE/-fPIC and
# large functions that use global variables. The bug is in all releases of
# GCC, but it became particularly acute in 4.6.x and 4.7.x. It is fixed in
fi
fi
+##########################################
+# capstone
+
+case "$capstone" in
+ "" | yes)
+ if $pkg_config capstone; then
+ capstone=system
+ elif test -e "${source_path}/.git" ; then
+ capstone=git
+ elif test -e "${source_path}/capstone/Makefile" ; then
+ capstone=internal
+ elif test -z "$capstone" ; then
+ capstone=no
+ else
+ feature_not_found "capstone" "Install capstone devel or git submodule"
+ fi
+ ;;
+
+ system)
+ if ! $pkg_config capstone; then
+ feature_not_found "capstone" "Install capstone devel"
+ fi
+ ;;
+esac
+
+case "$capstone" in
+ git | internal)
+ if test "$capstone" = git; then
+ git_submodules="${git_submodules} capstone"
+ fi
+ mkdir -p capstone
+ QEMU_CFLAGS="$QEMU_CFLAGS -I\$(SRC_PATH)/capstone/include"
+ if test "$mingw32" = "yes"; then
+ LIBCAPSTONE=capstone.lib
+ else
+ LIBCAPSTONE=libcapstone.a
+ fi
+ LIBS="-L\$(BUILD_DIR)/capstone -lcapstone $LIBS"
+ ;;
+
+ system)
+ QEMU_CFLAGS="$QEMU_CFLAGS $($pkg_config --cflags capstone)"
+ LIBS="$($pkg_config --libs capstone) $LIBS"
+ ;;
+
+ no)
+ ;;
+ *)
+ error_exit "Unknown state for capstone: $capstone"
+ ;;
+esac
+
##########################################
# check if we have fdatasync
fi
mpath=no
fi
-fi
-if test "$xkbcommon" = "yes"; then
- tools="qemu-keymap\$(EXESUF) $tools"
+ if test "$xkbcommon" = "yes"; then
+ tools="qemu-keymap\$(EXESUF) $tools"
+ fi
fi
# Probe for guest agent support/options
echo "Windows SDK $win_sdk"
fi
echo "Source path $source_path"
+echo "GIT binary $git"
echo "GIT submodules $git_submodules"
echo "C compiler $cc"
echo "Host C compiler $host_cc"
echo "avx2 optimization $avx2_opt"
echo "replication support $replication"
echo "VxHS block device $vxhs"
+echo "capstone $capstone"
if test "$sdl_too_old" = "yes"; then
echo "-> Your SDL version is too old - please upgrade to have SDL support"
echo "extra_ldflags=$EXTRA_LDFLAGS" >> $config_host_mak
echo "qemu_localedir=$qemu_localedir" >> $config_host_mak
echo "libs_softmmu=$libs_softmmu" >> $config_host_mak
+echo "GIT=$git" >> $config_host_mak
echo "GIT_SUBMODULES=$git_submodules" >> $config_host_mak
+echo "GIT_UPDATE=$git_update" >> $config_host_mak
echo "ARCH=$ARCH" >> $config_host_mak
if test "$ivshmem" = "yes" ; then
echo "CONFIG_IVSHMEM=y" >> $config_host_mak
fi
+if test "$capstone" != "no" ; then
+ echo "CONFIG_CAPSTONE=y" >> $config_host_mak
+fi
# Hold two types of flag:
# CONFIG_THREAD_SETNAME_BYTHREAD - we've got a way of setting the name on
echo "CPP=$cpp" >> $config_host_mak
echo "OBJCOPY=$objcopy" >> $config_host_mak
echo "LD=$ld" >> $config_host_mak
+echo "RANLIB=$ranlib" >> $config_host_mak
echo "NM=$nm" >> $config_host_mak
echo "WINDRES=$windres" >> $config_host_mak
echo "CFLAGS=$CFLAGS" >> $config_host_mak
if [ "$dtc_internal" = "yes" ]; then
echo "config-host.h: subdir-dtc" >> $config_host_mak
fi
+if [ "$capstone" = "git" -o "$capstone" = "internal" ]; then
+ echo "config-host.h: subdir-capstone" >> $config_host_mak
+fi
+if test -n "$LIBCAPSTONE"; then
+ echo "LIBCAPSTONE=$LIBCAPSTONE" >> $config_host_mak
+fi
if test "$numa" = "yes"; then
echo "CONFIG_NUMA=y" >> $config_host_mak
echo "OBJCOPY=objcopy" >> $config_mak
echo "IASL=$iasl" >> $config_mak
echo "LD=$ld" >> $config_mak
+ echo "RANLIB=$ranlib" >> $config_mak
done
# set up tests data directory