From patchwork Tue Oct 25 09:20:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 9394217 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 66D2060762 for ; Tue, 25 Oct 2016 09:23:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5698529365 for ; Tue, 25 Oct 2016 09:23:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4B71E29404; Tue, 25 Oct 2016 09:23:46 +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 88D4C29365 for ; Tue, 25 Oct 2016 09:23:42 +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 1byxum-0000Sd-Cq; Tue, 25 Oct 2016 09:21:00 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1byxul-0000SX-8p for xen-devel@lists.xenproject.org; Tue, 25 Oct 2016 09:20:59 +0000 Received: from [85.158.137.68] by server-9.bemta-3.messagelabs.com id 10/0E-01912-AF32F085; Tue, 25 Oct 2016 09:20:58 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprNIsWRWlGSWpSXmKPExsWyU9JRQvenMn+ Ewdwlhhbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8aCib+YCq6LV/S8+MjcwDhHpIuRg0NCwE/i 3hejLkZODjYBHYmLc3eygYRFBFQkbu816GLk4mAWWMYo8ffZbSaQGmGBQIlTx7uYQWwWAVWJa 4d7wep5BVwkZu4xAQlLCOhKPDz3mxXE5hUQlDg58wkLiM0soCnRuv03O4QtL9G8dTbYGCEBRY n+eQ/YIHrTJbb+/cUMYXNLrPz8h2UCI98sJKNmIRk1C8moBYzMqxg1ilOLylKLdA1N9JKKMtM zSnITM3N0DQ2M9XJTi4sT01NzEpOK9ZLzczcxAgONAQh2MK7Y7nmIUZKDSUmUt/EzX4QQX1J+ SmVGYnFGfFFpTmrxIUYZDg4lCd5yYOAKCRalpqdWpGXmAEMeJi3BwaMkwmsLkuYtLkjMLc5Mh 0idYlSUEuc1BEkIgCQySvPg2mBxdolRVkqYlxHoECGegtSi3MwSVPlXjOIcjErCvC4gU3gy80 rgpr8CWswEtFgwngdkcUkiQkqqgTG4qfS9rEz7q7//euofPGr4nuATFzntnZ3vjPQ5Tw8ILlo VEKe6dIpfke7TQKfjsVmu51g9F87ct6Dnf8kHnrflL5MKtn06zfR1Xlay9fzehCOK03+wqJj3 L0lbwZCYse2c9f/Nd14qa92f1NisLLsm7ZnB2gYXRYFojmuKHozW6tN3uBwUNldiKc5INNRiL ipOBAApsaYYrgIAAA== X-Env-Sender: prvs=099ae7f8d=roger.pau@citrix.com X-Msg-Ref: server-5.tower-31.messagelabs.com!1477387257!63997157!1 X-Originating-IP: [185.25.65.24] X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.0.13; banners=-,-,- X-VirusChecked: Checked Received: (qmail 40242 invoked from network); 25 Oct 2016 09:20:57 -0000 Received: from smtp.ctxuk.citrix.com (HELO SMTP.EU.CITRIX.COM) (185.25.65.24) by server-5.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 25 Oct 2016 09:20:57 -0000 X-IronPort-AV: E=Sophos;i="5.31,545,1473120000"; d="scan'208";a="33668454" From: Roger Pau Monne To: Date: Tue, 25 Oct 2016 11:20:48 +0200 Message-ID: <1477387248-22792-1-git-send-email-roger.pau@citrix.com> X-Mailer: git-send-email 2.7.4 (Apple Git-66) MIME-Version: 1.0 X-ClientProxiedBy: AMSPEX02CAS01.citrite.net (10.69.22.112) To AMSPEX02CL02.citrite.net (10.69.22.126) X-DLP: AMS1 Cc: Wei Liu , Alexander Nusov , Ian Jackson , Roger Pau Monne Subject: [Xen-devel] [PATCH for-4.8] tools/configure: fix pkg-config install path for FreeBSD 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 pkg-config from FreeBSD ports doesn't have ${prefix}/share/pkgconfig in the default search path, fix this by having a PKG_INSTALLDIR variable that can be changed on a per-OS basis. It would be best to use PKG_INSTALLDIR as defined by the pkg.m4 macro, but sadly this also reports a wrong value on FreeBSD (${libdir}/pkgconfig, which expands to /usr/local/lib/pkgconfig by default, and is also _not_ part of the default pkg-config search path). This patch should not change the behavior for Linux installs. Signed-off-by: Roger Pau Monné Reported-by: Alexander Nusov --- Cc: Ian Jackson Cc: Wei Liu Cc: Alexander Nusov --- config/FreeBSD.mk | 1 + config/Paths.mk.in | 2 ++ config/Tools.mk.in | 2 ++ tools/configure.ac | 3 +++ tools/libxl/Makefile | 4 ++-- 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/config/FreeBSD.mk b/config/FreeBSD.mk index bb3a5d0..afeaefb 100644 --- a/config/FreeBSD.mk +++ b/config/FreeBSD.mk @@ -2,3 +2,4 @@ include $(XEN_ROOT)/config/StdGNU.mk # No wget on FreeBSD base system WGET = ftp +PKG_INSTALLDIR = ${prefix}/libdata/pkgconfig diff --git a/config/Paths.mk.in b/config/Paths.mk.in index 62cea48..a603295 100644 --- a/config/Paths.mk.in +++ b/config/Paths.mk.in @@ -56,3 +56,5 @@ XENFIRMWAREDIR := @XENFIRMWAREDIR@ XEN_CONFIG_DIR := @XEN_CONFIG_DIR@ XEN_SCRIPT_DIR := @XEN_SCRIPT_DIR@ + +PKG_INSTALLDIR := ${SHAREDIR}/pkgconfig diff --git a/config/Tools.mk.in b/config/Tools.mk.in index 0f79f4e..1c7a565 100644 --- a/config/Tools.mk.in +++ b/config/Tools.mk.in @@ -37,6 +37,8 @@ PTHREAD_LIBS := @PTHREAD_LIBS@ PTYFUNCS_LIBS := @PTYFUNCS_LIBS@ +PKG_INSTALLDIR := @pkgconfigdir@ + LIBNL3_LIBS := @LIBNL3_LIBS@ LIBNL3_CFLAGS := @LIBNL3_CFLAGS@ XEN_TOOLS_RPATH := @rpath@ diff --git a/tools/configure.ac b/tools/configure.ac index 5724ace..164264f 100644 --- a/tools/configure.ac +++ b/tools/configure.ac @@ -436,6 +436,9 @@ AS_IF([test "x$libnl3_lib" = "xn" ], [ AC_SUBST(LIBNL3_LIBS) AC_SUBST(LIBNL3_CFLAGS) +# Replace pkg-config config dir +PKG_INSTALLDIR + fi # ! $rump AX_AVAILABLE_SYSTEMD() diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile index a3c0af8..6d323ef 100644 --- a/tools/libxl/Makefile +++ b/tools/libxl/Makefile @@ -297,8 +297,8 @@ install: all $(INSTALL_DATA) libxlutil.a $(DESTDIR)$(libdir) $(INSTALL_DATA) libxl.h libxl_event.h libxl_json.h _libxl_types.h _libxl_types_json.h _libxl_list.h libxl_utils.h libxl_uuid.h libxlutil.h $(DESTDIR)$(includedir) $(INSTALL_DATA) bash-completion $(DESTDIR)$(BASH_COMPLETION_DIR)/xl.sh - $(INSTALL_DATA) xenlight.pc $(DESTDIR)$(SHAREDIR)/pkgconfig/ - $(INSTALL_DATA) xlutil.pc $(DESTDIR)$(SHAREDIR)/pkgconfig/ + $(INSTALL_DATA) xenlight.pc $(PKG_INSTALLDIR) + $(INSTALL_DATA) xlutil.pc $(PKG_INSTALLDIR) .PHONY: clean clean: