From patchwork Fri Mar 24 16:42:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Durrant X-Patchwork-Id: 9643321 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 D824C602C9 for ; Fri, 24 Mar 2017 16:44:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C856526E16 for ; Fri, 24 Mar 2017 16:44:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B9F7826E4C; Fri, 24 Mar 2017 16:44:41 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 46ACF26E16 for ; Fri, 24 Mar 2017 16:44:39 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crSI7-0006ZQ-UW; Fri, 24 Mar 2017 16:42:19 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crSI6-0006ZK-Mm for xen-devel@lists.xenproject.org; Fri, 24 Mar 2017 16:42:18 +0000 Received: from [85.158.139.211] by server-9.bemta-5.messagelabs.com id 1F/1E-32461-96C45D85; Fri, 24 Mar 2017 16:42:17 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrPIsWRWlGSWpSXmKPExsWyU9JRQjfN52q EwaE+QYvvWyYzOTB6HP5whSWAMYo1My8pvyKBNWPC4v/MBSfEK/b2yDYwLhDvYuTkkBDwk5gw bSkziM0moCOx9Oh8JhBbRCBUYmHjDZYuRi4OZoFzjBKfZl9gB0kIC0RKvD/wgRmiKEriy6I/7 CBFIgJNjBJv395k62Lk4GARUJU48dAVpIZXwF2iobmJDaRGSKCJTWLdvAMsIDWcAjYSmx4Ugd QwCshKfGlcDTaTWUBc4tYTiCMkBAQkluw5zwxhi0q8fPyPFcI2kNi6dB/YGGYBTYn1u/QhWhU lpnQ/ZIdYKyhxcuYTlgmMwrOQTJ2F0DELSccsJB0LGFlWMWoUpxaVpRbpGproJRVlpmeU5CZm 5ugaGpjq5aYWFyemp+YkJhXrJefnbmIEBj4DEOxgPHva8xCjJAeTkiiv27YrEUJ8SfkplRmJx RnxRaU5qcWHGGU4OJQkeMW9rkYICRalpqdWpGXmAGMQJi3BwaMkwssMkuYtLkjMLc5Mh0idYt TlmDN79xsmIZa8/LxUKXFeFpAiAZCijNI8uBGwdHCJUVZKmJcR6CghnoLUotzMElT5V4ziHIx KwrwPPYGm8GTmlcBtegV0BBPQEbM3XAE5oiQRISXVwOihvaLuz91765vXd/SEiun3231cq/zv X6Xx4eteb/baXbp9LvznvWlznv5IfXiu3/i8jExjh4XT1q273skmBB/K+2im1/rjlYmHbvKCl E3zQ4QC9rmudPvRzjTltkXxQibPuCk2K3Zb7+pjS+3/lWu/Rk+OOb48lvf6DuPtB1oloxjvbZ MIuqzEUpyRaKjFXFScCADidZLaAgMAAA== X-Env-Sender: prvs=249263d75=Paul.Durrant@citrix.com X-Msg-Ref: server-5.tower-206.messagelabs.com!1490373734!89618650!1 X-Originating-IP: [185.25.65.24] X-SpamReason: No, hits=0.0 required=7.0 tests=received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.2.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 8339 invoked from network); 24 Mar 2017 16:42:14 -0000 Received: from smtp.ctxuk.citrix.com (HELO SMTP.EU.CITRIX.COM) (185.25.65.24) by server-5.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 24 Mar 2017 16:42:14 -0000 X-IronPort-AV: E=Sophos;i="5.36,215,1486425600"; d="scan'208";a="43078884" From: Paul Durrant To: 'Juergen Gross' , 'Stefano Stabellini' Thread-Topic: [Xen-devel] [PATCH 2/2] configure: use pkg-config for obtaining xen version Thread-Index: AQHSnmBsrZeKSZDgm0WcO5EgFCYtz6GX2AsAgACOOACAAOY1AIAFb8IAgADfeQCAAKnQgIAA3zkAgAL/YLD///a2AIAAEP6g///ztgCAAADbgIAAHXmQ Date: Fri, 24 Mar 2017 16:42:13 +0000 Message-ID: <1bd386167cff4ef9a281139afb9308dc@AMSPEX02CL03.citrite.net> References: <20170316141953.16161-1-jgross@suse.com> <20170316141953.16161-3-jgross@suse.com> <214bc24d-1c0c-16d6-9c33-e20962b150d2@suse.com> <2fb1da9d14c14eb4826a87657f7d0eb1@AMSPEX02CL03.citrite.net> <550ea61e-c9ba-5afc-12b5-438a2a57af6e@suse.com> <7208ddd9b76b4196be0a3d3cd12aee71@AMSPEX02CL03.citrite.net> <20f2b3ce-218b-4d61-6af1-8c70b751ed18@suse.com> <0103d60e-cd96-ab48-70fb-f75ba1273f39@suse.com> In-Reply-To: <0103d60e-cd96-ab48-70fb-f75ba1273f39@suse.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted MIME-Version: 1.0 Cc: Anthony Perard , "xen-devel@lists.xenproject.org" , "qemu-devel@nongnu.org" , "kraxel@redhat.com" Subject: Re: [Xen-devel] [PATCH 2/2] configure: use pkg-config for obtaining xen version X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP > -----Original Message----- [snip] > >> That's a change in behaviour that I, and probably others, have long been > used to. What we really want, presumably, is to have pkg-config just look > under tools/pkgconfig when querying for the version of xencontrol. Could > that not be done by simply setting PKG_CONFIG_LIBDIR in QEMU's configure > script, or would it still mean picking up installed libraries before ones just > built? > > > > I guess this would break qemu's configure badly as it wouldn't find all > > the other library informations it is looking for via pkg-config. > > Aah, wait, you mean just for the Xen query? > > This might complicate things for my qemu stubdom plans... > How about this patch to QEMU configure? This appears to DTRT for me when switching between versions of Xen. Paul diff --git a/configure b/configure index fdf47e4..6ef5980 100755 --- a/configure +++ b/configure @@ -1974,6 +1974,10 @@ fi ########################################## # xen probe +xen_query_pkg_config() { + PKG_CONFIG_LIBDIR= ${pkg_config_exe} "$@" +} + if test "$xen" != "no" ; then xen_libs="-lxenstore -lxenctrl -lxenguest" xen_stable_libs="-lxenforeignmemory -lxengnttab -lxenevtchn" @@ -1997,9 +2001,9 @@ EOF xen=no # Xen version via pkg-config (Xen 4.9.0 and newer) - elif $pkg_config --exists xencontrol ; then + elif xen_query_pkg_config --exists xencontrol; then xen_ctrl_version="$(printf '%d%02d%02d' \ - $($pkg_config --modversion xencontrol | sed 's/\./ /g') )" + $(xen_query_pkg_config --modversion xencontrol | sed 's/\./ /g') )" xen=yes elif @@ -2216,8 +2220,8 @@ EOF if test $xen_ctrl_version -ge 40900 ; then xen_pc="xencontrol xenstore xenguest xenforeignmemory xengnttab xenevtchn" xen_pc="$xen_pc xendevicemodel" - xen_libs="$($pkg_config --libs $xen_pc)" - QEMU_CFLAGS="$QEMU_CFLAGS $($pkg_config --cflags $xen_pc)" + xen_libs="$(xen_query_pkg_config --libs $xen_pc)" + QEMU_CFLAGS="$QEMU_CFLAGS $(xen_query_pkg_config --cflags $xen_pc)" elif test $xen_ctrl_version -ge 40701 ; then libs_softmmu="$xen_stable_libs $libs_softmmu" fi