From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:43465) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hB56c-0006Wg-L7 for qemu-devel@nongnu.org; Mon, 01 Apr 2019 18:08:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hB56Z-0007qC-0w for qemu-devel@nongnu.org; Mon, 01 Apr 2019 18:08:36 -0400 Received: from mail-it1-x142.google.com ([2607:f8b0:4864:20::142]:40844) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hB56P-0007cz-Jc for qemu-devel@nongnu.org; Mon, 01 Apr 2019 18:08:28 -0400 Received: by mail-it1-x142.google.com with SMTP id k64so1823381itb.5 for ; Mon, 01 Apr 2019 15:08:21 -0700 (PDT) From: Stephen Checkoway Date: Mon, 1 Apr 2019 18:07:52 -0400 Message-Id: <20190401220752.22577-1-stephen.checkoway@oberlin.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH] capstone: Support capstone/capstone.h List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Stephen Checkoway Starting with version 4 of capstone, the header files live in the `$prefix/include/capstone` directory. This modifies the configure script to check for if cannot be found. Signed-off-by: Stephen Checkoway --- configure | 9 +++++++++ include/disas/capstone.h | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/configure b/configure index 1c563a7027..da87c18f14 100755 --- a/configure +++ b/configure @@ -5039,6 +5039,12 @@ case "$capstone" in ;; esac +if test "$capstone" != no; then + if ! check_include "capstone.h" && check_include "capstone/capstone.h"; then + have_capstone_capstone_h=yes + fi +fi + ########################################## # check if we have fdatasync @@ -7199,6 +7205,9 @@ if test "$ivshmem" = "yes" ; then fi if test "$capstone" != "no" ; then echo "CONFIG_CAPSTONE=y" >> $config_host_mak + if test "$have_capstone_capstone_h" = "yes" ; then + echo "HAVE_CAPSTONE_CAPSTONE_H=y" >> $config_host_mak + fi fi if test "$debug_mutex" = "yes" ; then echo "CONFIG_DEBUG_MUTEX=y" >> $config_host_mak diff --git a/include/disas/capstone.h b/include/disas/capstone.h index 84e214956d..e1477bf6a2 100644 --- a/include/disas/capstone.h +++ b/include/disas/capstone.h @@ -3,7 +3,11 @@ #ifdef CONFIG_CAPSTONE +#ifdef HAVE_CAPSTONE_CAPSTONE_H +#include +#else #include +#endif #else -- 2.20.1 (Apple Git-117)