aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure68
1 files changed, 9 insertions, 59 deletions
diff --git a/configure b/configure
index baa245b5ad..66641099fc 100755
--- a/configure
+++ b/configure
@@ -376,7 +376,7 @@ opengl=""
opengl_dmabuf="no"
cpuid_h="no"
avx2_opt=""
-capstone=""
+capstone="auto"
lzo=""
snappy=""
bzip2=""
@@ -1459,11 +1459,11 @@ for opt do
;;
--enable-vhost-kernel) vhost_kernel="yes"
;;
- --disable-capstone) capstone="no"
+ --disable-capstone) capstone="disabled"
;;
- --enable-capstone) capstone="yes"
+ --enable-capstone) capstone="enabled"
;;
- --enable-capstone=git) capstone="git"
+ --enable-capstone=git) capstone="internal"
;;
--enable-capstone=system) capstone="system"
;;
@@ -4867,51 +4867,11 @@ fi
# capstone
case "$capstone" in
- "" | yes)
- if $pkg_config capstone; then
- capstone=system
- elif test -e "${source_path}/.git" && test $git_update = 'yes' ; 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
+ auto | enabled | internal)
+ # Simpler to always update submodule, even if not needed.
+ if test -e "${source_path}/.git" && test $git_update = 'yes' ; then
git_submodules="${git_submodules} capstone"
fi
- mkdir -p capstone
- if test "$mingw32" = "yes"; then
- LIBCAPSTONE=capstone.lib
- else
- LIBCAPSTONE=libcapstone.a
- fi
- capstone_libs="-Lcapstone -lcapstone"
- capstone_cflags="-I${source_path}/capstone/include"
- ;;
-
- system)
- capstone_libs="$($pkg_config --libs capstone)"
- capstone_cflags="$($pkg_config --cflags capstone)"
- ;;
-
- no)
- ;;
- *)
- error_exit "Unknown state for capstone: $capstone"
;;
esac
@@ -6963,11 +6923,6 @@ fi
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
- echo "CAPSTONE_CFLAGS=$capstone_cflags" >> $config_host_mak
- echo "CAPSTONE_LIBS=$capstone_libs" >> $config_host_mak
-fi
if test "$debug_mutex" = "yes" ; then
echo "CONFIG_DEBUG_MUTEX=y" >> $config_host_mak
fi
@@ -7183,17 +7138,11 @@ done
if [ "$fdt" = "git" ]; then
subdirs="$subdirs dtc"
fi
-if [ "$capstone" = "git" -o "$capstone" = "internal" ]; then
- subdirs="$subdirs capstone"
-fi
echo "CONFIG_QEMU_INTERP_PREFIX=$interp_prefix" | sed 's/%M/@0@/' >> $config_host_mak
if test "$default_targets" = "yes"; then
echo "CONFIG_DEFAULT_TARGETS=y" >> $config_host_mak
fi
echo "SUBDIRS=$subdirs" >> $config_host_mak
-if test -n "$LIBCAPSTONE"; then
- echo "LIBCAPSTONE=$LIBCAPSTONE" >> $config_host_mak
-fi
if test "$numa" = "yes"; then
echo "CONFIG_NUMA=y" >> $config_host_mak
@@ -7371,7 +7320,8 @@ NINJA=${ninja:-$PWD/ninjatool} $meson setup \
-Dxen=$xen -Dxen_pci_passthrough=$xen_pci_passthrough -Dtcg=$tcg \
-Dcocoa=$cocoa -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\
+ -Dgettext=$gettext -Dxkbcommon=$xkbcommon -Du2f=$u2f \
+ -Dcapstone=$capstone \
$cross_arg \
"$PWD" "$source_path"