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 a584124..f46f433 100755
--- a/configure
+++ b/configure
@@ -478,7 +478,7 @@ opengl=""
opengl_dmabuf="no"
cpuid_h="no"
avx2_opt=""
-capstone=""
+capstone="auto"
lzo=""
snappy=""
bzip2=""
@@ -1575,11 +1575,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"
;;
@@ -5017,51 +5017,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
@@ -7142,11 +7102,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
@@ -7664,13 +7619,7 @@ done # for target in $targets
if [ "$fdt" = "git" ]; then
subdirs="$subdirs dtc"
fi
-if [ "$capstone" = "git" -o "$capstone" = "internal" ]; then
- subdirs="$subdirs capstone"
-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
@@ -7846,7 +7795,8 @@ NINJA=${ninja:-$PWD/ninjatool} $meson setup \
-Dmalloc=$malloc -Dmalloc_trim=$malloc_trim \
-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"