From patchwork Tue Apr 25 18:34:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 9699375 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 72D78601D3 for ; Tue, 25 Apr 2017 18:39:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 611C928452 for ; Tue, 25 Apr 2017 18:39:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 54CDD284EE; Tue, 25 Apr 2017 18:39:29 +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 1680828452 for ; Tue, 25 Apr 2017 18:39:28 +0000 (UTC) Received: from localhost ([::1]:50878 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d35N1-0001fk-AK for patchwork-qemu-devel@patchwork.kernel.org; Tue, 25 Apr 2017 14:39:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52042) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d35J6-0007pA-TN for qemu-devel@nongnu.org; Tue, 25 Apr 2017 14:35:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d35J5-0005jb-Vt for qemu-devel@nongnu.org; Tue, 25 Apr 2017 14:35:24 -0400 Received: from mail.kernel.org ([198.145.29.136]:49668) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d35J5-0005jV-QF for qemu-devel@nongnu.org; Tue, 25 Apr 2017 14:35:23 -0400 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3215F201B9; Tue, 25 Apr 2017 18:35:22 +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 B324F201EF; Tue, 25 Apr 2017 18:35:19 +0000 (UTC) From: Stefano Stabellini To: peter.maydell@linaro.org Date: Tue, 25 Apr 2017 11:34:56 -0700 Message-Id: <1493145313-31311-4-git-send-email-sstabellini@kernel.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1493145313-31311-1-git-send-email-sstabellini@kernel.org> References: <1493145313-31311-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] [PATCH 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 <