From patchwork Fri Apr 21 20:14:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 9693663 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A47AA601D4 for ; Fri, 21 Apr 2017 20:19:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9654428675 for ; Fri, 21 Apr 2017 20:19:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8B21F28678; Fri, 21 Apr 2017 20:19:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 47ED628675 for ; Fri, 21 Apr 2017 20:19:10 +0000 (UTC) Received: from localhost ([::1]:33041 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d1f1J-0006dI-Gg for patchwork-qemu-devel@patchwork.kernel.org; Fri, 21 Apr 2017 16:19:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35528) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d1exW-0003mq-8a for qemu-devel@nongnu.org; Fri, 21 Apr 2017 16:15:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d1exV-0002f1-4t for qemu-devel@nongnu.org; Fri, 21 Apr 2017 16:15:14 -0400 Received: from mail.kernel.org ([198.145.29.136]:42650) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d1exU-0002ex-VX for qemu-devel@nongnu.org; Fri, 21 Apr 2017 16:15:13 -0400 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 661EE20221; Fri, 21 Apr 2017 20:15:11 +0000 (UTC) Received: from localhost.localdomain (unknown [99.165.194.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 46E3F20220; Fri, 21 Apr 2017 20:15:10 +0000 (UTC) From: Stefano Stabellini To: peter.maydell@linaro.org Date: Fri, 21 Apr 2017 13:14:45 -0700 Message-Id: <1492805702-19690-4-git-send-email-sstabellini@kernel.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1492805702-19690-1-git-send-email-sstabellini@kernel.org> References: <1492805702-19690-1-git-send-email-sstabellini@kernel.org> X-Virus-Scanned: ClamAV using ClamSMTP X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 198.145.29.136 Subject: [Qemu-devel] [PULL 04/21] configure: detect presence of libxendevicemodel 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: sstabellini@kernel.org, stefanha@gmail.com, qemu-devel@nongnu.org, Paul Durrant , stefanha@redhat.com, anthony.perard@citrix.com, xen-devel@lists.xenproject.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Paul Durrant This patch adds code in configure to set CONFIG_XEN_CTRL_INTERFACE_VERSION to a new value of 490 if libxendevicemodel is present in the build environment. Signed-off-by: Paul Durrant Signed-off-by: Stefano Stabellini Reviewed-by: Anthony Perard Reviewed-by: Stefano Stabellini --- configure | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 3291603..e333547 100755 --- a/configure +++ b/configure @@ -1976,7 +1976,7 @@ fi if test "$xen" != "no" ; then xen_libs="-lxenstore -lxenctrl -lxenguest" - xen_stable_libs="-lxenforeignmemory -lxengnttab -lxenevtchn" + xen_stable_libs="-lxencall -lxenforeignmemory -lxengnttab -lxenevtchn" # First we test whether Xen headers and libraries are available. # If no, we are done and there is no Xen support. @@ -1999,6 +1999,25 @@ EOF # Xen unstable elif cat > $TMPC < +int main(void) { + xendevicemodel_handle *xd; + + xd = xendevicemodel_open(0, 0); + xendevicemodel_close(xd); + + return 0; +} +EOF + compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs" + then + xen_stable_libs="-lxendevicemodel $xen_stable_libs" + xen_ctrl_version=490 + xen=yes + elif + cat > $TMPC <