From nobody Tue Apr 30 07:09:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1554157938296479.76200711417266; Mon, 1 Apr 2019 15:32:18 -0700 (PDT) Received: from localhost ([127.0.0.1]:33783 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hB5TT-0004co-4c for importer@patchew.org; Mon, 01 Apr 2019 18:32:15 -0400 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) Received: from worksec.oberlin.net (ip-210-181.oberlin.net. [208.66.210.181]) by smtp.gmail.com with ESMTPSA id q2sm4887135ioh.4.2019.04.01.15.08.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 01 Apr 2019 15:08:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oberlin-edu.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=n1Vyir/YqV1UykZAbpw5t28h3lIGbgJOwBe5lZLA7Ho=; b=Wf00toWZ1wPFcLHni43U/mKatLgm1EMruWaAz/NfrPq+2s6DzGtOi/9+p4u02rAifL wi5QI4e+SwgLao+FaovFNHNg/a2BFbDgrjGeaYYpXCMhzKdi5dXWfwCAU1nEZ/uj0XbH w8GBR0ge78QeX03sjp9V0rpekm36KQm8asaomG/QDRNCUYUHWi26yfj1YqUjquRsQW3K /s1evJuTEU3PsZYBOviNrbzGnVezCrjmAR2fg2thCzYmjAVOEZxuFZUIgDxi7I1YDtOV 72hl+b6N3nxlPqbRUBibbZQKgydnAmAIwfCvLuFIb/uEZOWJrKI/+mpUYT3YK6TiD62B O97w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=n1Vyir/YqV1UykZAbpw5t28h3lIGbgJOwBe5lZLA7Ho=; b=ClCHA5/UeODakylwm2/Nv4s1abj+ueqKjn8FGFp0tIwaoYme7x4if60GNbAC7aFlZT f9H1Nb8vw/D4q3jmxT7xI/DBfFGe47iFAVMmy+D+MPev/5jkDDVIukyUgH9MXOLpbILR g9L3Bt0kcxyTUUuPcFhvVXnMq5UFhUWbCXxlWtqp7onQsWc4vN5T5gpadX8xjw7NmxlZ nqL/X6Qx1UCxpZRNs3hhm5Qhn/rLKLUNxeCDTvi6aySQpPIGeCbdyA6K5umLyvBdupiE a1Fb7U9SSQlo4S1xmzmnIlMTrnwEtxfodYuvDm3dAbHWB8qdGHlFKo0gJBHCxDrpzqaz dxZg== X-Gm-Message-State: APjAAAV42wLkE/E9tc4ovbSqQ2Eb+3OKT0fXYCNlaW5P5o8ifGUQwrnp r51XnHexmr3HLXY59g6kwx+q3nIXs6fDLg== X-Google-Smtp-Source: APXvYqwpInEhPqQIjjw2YypKTkjgXdK5TqzhXFPPhM/3tZ6bf6SKz994lMl0x59lluswDN6GFEYYbA== X-Received: by 2002:a24:fa41:: with SMTP id v62mr1711564ith.10.1554156500608; Mon, 01 Apr 2019 15:08:20 -0700 (PDT) From: Stephen Checkoway To: qemu-devel@nongnu.org Date: Mon, 1 Apr 2019 18:07:52 -0400 Message-Id: <20190401220752.22577-1-stephen.checkoway@oberlin.edu> X-Mailer: git-send-email 2.20.1 (Apple Git-117) MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::142 Subject: [Qemu-devel] [PATCH] capstone: Support capstone/capstone.h X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stephen Checkoway Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" 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 =20 +if test "$capstone" !=3D no; then + if ! check_include "capstone.h" && check_include "capstone/capstone.h"; = then + have_capstone_capstone_h=3Dyes + fi +fi + ########################################## # check if we have fdatasync =20 @@ -7199,6 +7205,9 @@ if test "$ivshmem" =3D "yes" ; then fi if test "$capstone" !=3D "no" ; then echo "CONFIG_CAPSTONE=3Dy" >> $config_host_mak + if test "$have_capstone_capstone_h" =3D "yes" ; then + echo "HAVE_CAPSTONE_CAPSTONE_H=3Dy" >> $config_host_mak + fi fi if test "$debug_mutex" =3D "yes" ; then echo "CONFIG_DEBUG_MUTEX=3Dy" >> $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 @@ =20 #ifdef CONFIG_CAPSTONE =20 +#ifdef HAVE_CAPSTONE_CAPSTONE_H +#include +#else #include +#endif =20 #else =20 --=20 2.20.1 (Apple Git-117)