debug_info="yes"
stack_protector=""
+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
vnc_sasl=""
vnc_jpeg=""
vnc_png=""
+xkbcommon=""
xen=""
xen_ctrl_version=""
xen_pv_domain_build="no"
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}"
solaris="yes"
make="${MAKE-gmake}"
install="${INSTALL-ginstall}"
- ld="gld"
smbd="${SMBD-/usr/sfw/sbin/smbd}"
if test -f /usr/include/sys/soundcard.h ; then
audio_drv_list="oss"
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
+##########################################
+# xkbcommon probe
+if test "$xkbcommon" != "no" ; then
+ if $pkg_config xkbcommon --exists; then
+ xkbcommon_cflags=$($pkg_config xkbcommon --cflags)
+ xkbcommon_libs=$($pkg_config xkbcommon --libs)
+ xkbcommon=yes
+ else
+ if test "$xkbcommon" = "yes" ; then
+ feature_not_found "xkbcommon" "Install libxkbcommon-devel"
+ fi
+ xkbcommon=no
+ fi
+fi
+
##########################################
# fnmatch() probe, used for ACL routines
fnmatch="no"
#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) {
- struct udev *udev = udev_new();
- mpath_lib_init(udev);
+ udev = udev_new();
+ multipath_conf = mpath_lib_init();
return 0;
}
EOF
tpm_passthrough=no
fi
+# TPM emulator is for all posix systems
+if test "$mingw32" != "yes"; then
+ tpm_emulator=$tpm
+else
+ tpm_emulator=no
+fi
##########################################
# attr probe
if compile_prog "" "$fdt_libs" ; then
# system DTC is good - use it
fdt=yes
- elif test -d ${source_path}/dtc/libfdt ; then
- # have submodule DTC - use it
- fdt=yes
- dtc_internal="yes"
- mkdir -p dtc
- if [ "$pwd_is_source_path" != "y" ] ; then
- symlink "$source_path/dtc/Makefile" "dtc/Makefile"
- symlink "$source_path/dtc/scripts" "dtc/scripts"
- fi
- fdt_cflags="-I\$(SRC_PATH)/dtc/libfdt"
- fdt_libs="-L\$(BUILD_DIR)/dtc/libfdt $fdt_libs"
- elif test "$fdt" = "yes" ; then
- # have neither and want - prompt for system/submodule install
- error_exit "DTC (libfdt) version >= 1.4.2 not present. Your options:" \
- " (1) Preferred: Install the DTC (libfdt) devel package" \
- " (2) Fetch the DTC submodule, using:" \
- " git submodule update --init dtc"
else
- # don't have and don't want
- fdt_libs=
- fdt=no
+ # have GIT checkout, so activate dtc submodule
+ if test -e "${source_path}/.git" ; then
+ git_submodules="${git_submodules} dtc"
+ fi
+ if test -d "${source_path}/dtc/libfdt" || test -e "${source_path}/.git" ; then
+ fdt=yes
+ dtc_internal="yes"
+ mkdir -p dtc
+ if [ "$pwd_is_source_path" != "y" ] ; then
+ symlink "$source_path/dtc/Makefile" "dtc/Makefile"
+ symlink "$source_path/dtc/scripts" "dtc/scripts"
+ fi
+ fdt_cflags="-I\$(SRC_PATH)/dtc/libfdt"
+ fdt_libs="-L\$(BUILD_DIR)/dtc/libfdt $fdt_libs"
+ elif test "$fdt" = "yes" ; then
+ # Not a git build & no libfdt found, prompt for system install
+ error_exit "DTC (libfdt) version >= 1.4.2 not present." \
+ "Please install the DTC (libfdt) devel package"
+ else
+ # don't have and don't want
+ fdt_libs=
+ fdt=no
+ fi
fi
fi
fi
# check for smartcard support
-smartcard_cflags=""
if test "$smartcard" != "no"; then
if $pkg_config libcacard; then
libcacard_cflags=$($pkg_config --cflags libcacard)
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
posix_syslog=yes
fi
+##########################################
+# check if we have sem_timedwait
+
+sem_timedwait=no
+cat > $TMPC << EOF
+#include <semaphore.h>
+int main(void) { return sem_timedwait(0, 0); }
+EOF
+if compile_prog "" "" ; then
+ sem_timedwait=yes
+fi
+
##########################################
# check if trace backend exists
fi
mpath=no
fi
+ 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 "C++ compiler $cxx"
echo "TPM support $tpm"
echo "libssh2 support $libssh2"
echo "TPM passthrough $tpm_passthrough"
+echo "TPM emulator $tpm_emulator"
echo "QOM debugging $qom_cast_debug"
echo "Live block migration $live_block_migration"
echo "lzo support $lzo"
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 "$vnc_png" = "yes" ; then
echo "CONFIG_VNC_PNG=y" >> $config_host_mak
fi
+if test "$xkbcommon" = "yes" ; then
+ echo "XKBCOMMON_CFLAGS=$xkbcommon_cflags" >> $config_host_mak
+ echo "XKBCOMMON_LIBS=$xkbcommon_libs" >> $config_host_mak
+fi
if test "$fnmatch" = "yes" ; then
echo "CONFIG_FNMATCH=y" >> $config_host_mak
fi
if test "$inotify1" = "yes" ; then
echo "CONFIG_INOTIFY1=y" >> $config_host_mak
fi
+if test "$sem_timedwait" = "yes" ; then
+ echo "CONFIG_SEM_TIMEDWAIT=y" >> $config_host_mak
+fi
if test "$byteswap_h" = "yes" ; then
echo "CONFIG_BYTESWAP_H=y" >> $config_host_mak
fi
echo "CONFIG_LIVE_BLOCK_MIGRATION=y" >> $config_host_mak
fi
-# TPM passthrough support?
if test "$tpm" = "yes"; then
echo 'CONFIG_TPM=$(CONFIG_SOFTMMU)' >> $config_host_mak
+ # TPM passthrough support?
if test "$tpm_passthrough" = "yes"; then
echo "CONFIG_TPM_PASSTHROUGH=y" >> $config_host_mak
fi
+ # TPM emulator support?
+ if test "$tpm_emulator" = "yes"; then
+ echo "CONFIG_TPM_EMULATOR=y" >> $config_host_mak
+ fi
fi
echo "TRACE_BACKENDS=$trace_backends" >> $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