From nobody Fri Apr 19 00:50:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1520603374607284.75295354317564; Fri, 9 Mar 2018 05:49:34 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0F4EF80B2A; Fri, 9 Mar 2018 13:49:32 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 13972226F8; Fri, 9 Mar 2018 13:49:31 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 778784CA99; Fri, 9 Mar 2018 13:49:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w29Dlioe006952 for ; Fri, 9 Mar 2018 08:47:44 -0500 Received: by smtp.corp.redhat.com (Postfix) id B4622226FA; Fri, 9 Mar 2018 13:47:44 +0000 (UTC) Received: from mx1.redhat.com (ext-mx07.extmail.prod.ext.phx2.redhat.com [10.5.110.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ADAC0226F9 for ; Fri, 9 Mar 2018 13:47:41 +0000 (UTC) Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [81.169.146.163]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E635DC047B72 for ; Fri, 9 Mar 2018 13:47:37 +0000 (UTC) Received: from sender ([2001:a62:816:91ff:a572:884d:f51d:1a86]) by smtp.strato.de (RZmta 42.19 AUTH) with ESMTPSA id L0854au29DlZWGs (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Fri, 9 Mar 2018 14:47:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1520603256; s=strato-dkim-0002; d=aepfle.de; h=Content-Transfer-Encoding:Message-Id:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=x14bJXyXzq9nfzl2w7kG3j1nHbgoiKZiMi/FW2B7cZY=; b=nk+yfvfyIq/noCkLteSHMpL8t+OQuQ6dE2QOmwNKQLKFTsUsm1tkTy+dHq6D9hNAgY 1hu7BNwPGij120DE77J/3X8lKyoVxfA+0jkEkZFVgttcjPcdAsVBBoHm1dz9+tBX8y3W SIlF3i981/CxhL521XKIuy2ZLXcEE+kkMg+I9B06q0sFX0UvgQsl9EycPdxLtpZ4/zgN 25EQfVcp38gPHFrR1LGOl1mecvtTxcMliQARqF8WqSptvRlY6+ag+m3cMqgCy0SMUzc6 Bt2kFVrIaPfZG+vu0u2VcViS2Q7zXiQAoHzxIWlVBFw+Op7NMbBws+e2rCYxB84UsUtA NXYA== X-RZG-AUTH: :P2EQZWCpfu+qG7CngxMFH1J+3q8wa/QXkBR9MXjAuzpIG0mv9coXAgc1+lb4Esstf6UEufFpy8L/NK2kKUAyDFSMDbcP X-RZG-CLASS-ID: mo00 From: Olaf Hering To: libvir-list@redhat.com Date: Fri, 9 Mar 2018 14:47:31 +0100 Message-Id: <20180309134731.25570-1-olaf@aepfle.de> MIME-Version: 1.0 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 207 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 09 Mar 2018 13:47:39 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 09 Mar 2018 13:47:39 +0000 (UTC) for IP:'81.169.146.163' DOMAIN:'mo4-p00-ob.smtp.rzone.de' HELO:'mo4-p00-ob.smtp.rzone.de' FROM:'olaf@aepfle.de' RCPT:'' X-RedHat-Spam-Score: -0.111 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS) 81.169.146.163 mo4-p00-ob.smtp.rzone.de 81.169.146.163 mo4-p00-ob.smtp.rzone.de X-Scanned-By: MIMEDefang 2.78 on 10.5.110.31 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Olaf Hering Subject: [libvirt] [PATCH] m4: use pkgconfig to detect xenstore X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 09 Mar 2018 13:49:33 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Since Xen 4.9 a pkgconfig file exists to gather info about building against libxenstore.so. Use it if available. Signed-off-by: Olaf Hering --- m4/virt-driver-xen.m4 | 41 +++++++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/m4/virt-driver-xen.m4 b/m4/virt-driver-xen.m4 index 2a26863ca..52d4f5162 100644 --- a/m4/virt-driver-xen.m4 +++ b/m4/virt-driver-xen.m4 @@ -27,25 +27,42 @@ AC_DEFUN([LIBVIRT_DRIVER_CHECK_XEN], [ old_CFLAGS=3D"$CFLAGS" XEN_LIBS=3D"" XEN_CFLAGS=3D"" + fail=3D0 =20 dnl search for the Xen store library + dnl Either use the provided path, or make use of pkgconfig + dnl Xen versions prior 4.9 had no pkgconfig file if test "$with_xen" !=3D "no" ; then + xen_path_provided=3D"no" if test "$with_xen" !=3D "yes" && test "$with_xen" !=3D "check" ; then XEN_CFLAGS=3D"-I$with_xen/include" XEN_LIBS=3D"-L$with_xen/lib64 -L$with_xen/lib" + xen_path_provided=3D"yes" + fi + + if test "$xen_path_provided" =3D "no" ; then + PKG_CHECK_MODULES([XEN], [xenstore], [ + fail=3D0 + with_xen=3Dyes + ], [ + fail=3D1 + ]) + fi + dnl manual check if either path was provided or pkgconfig does not exi= st + if test "$xen_path_provided" =3D "yes" || test "$fail" =3D 1 ; then + CFLAGS=3D"$CFLAGS $XEN_CFLAGS" + LIBS=3D"$LIBS $XEN_LIBS" + AC_CHECK_LIB([xenstore], [xs_read], [ + fail=3D0 + with_xen=3Dyes + XEN_LIBS=3D"$XEN_LIBS -lxenstore" + ],[ + if test "$with_xen" =3D "yes"; then + fail=3D1 + fi + with_xen=3Dno + ]) fi - fail=3D0 - CFLAGS=3D"$CFLAGS $XEN_CFLAGS" - LIBS=3D"$LIBS $XEN_LIBS" - AC_CHECK_LIB([xenstore], [xs_read], [ - with_xen=3Dyes - XEN_LIBS=3D"$XEN_LIBS -lxenstore" - ],[ - if test "$with_xen" =3D "yes"; then - fail=3D1 - fi - with_xen=3Dno - ]) fi =20 if test "$with_xen" !=3D "no" ; then -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list