[PATCH 2/3] configure: Do not build/check for capstone when emulation is disabled

Philippe Mathieu-Daudé posted 3 patches 4 years, 10 months ago
There is a newer version of this series
[PATCH 2/3] configure: Do not build/check for capstone when emulation is disabled
Posted by Philippe Mathieu-Daudé 4 years, 10 months ago
The capstone library is only used by system and user mode
emulation. When it is not required, do not check for it.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 configure | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/configure b/configure
index 012c527e3cd..a5159157a49 100755
--- a/configure
+++ b/configure
@@ -2291,6 +2291,11 @@ if [ "$tcg" = "auto" ]; then
     fi
 fi
 
+# if neither system nor user emulation requested, capstone is not needed
+if [ "$softmmu" = "no" ] && [ "$linux_user" = "no" ] && [ "$bsd_user" = "no" ]; then
+    capstone="disabled"
+fi
+
 feature_not_found() {
   feature=$1
   remedy=$2
-- 
2.26.2