From: Uri Simchoni Date: Thu, 19 Jan 2017 05:46:57 +0000 (+0200) Subject: waf: backport finding of pkg-config X-Git-Tag: samba-4.4.10~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c808b732fbfcf88bb64a48978dd98345b99feabe;p=thirdparty%2Fsamba.git waf: backport finding of pkg-config Allow the builder to customize the location of pkg-config utility by setting PKGCONFIG environment variable. This is backported from upstream waf. Thanks to Zentaro Kavanagh for pointing that out and proposing the fix. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12529 Signed-off-by: Uri Simchoni Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Wed Jan 25 04:23:00 CET 2017 on sn-devel-144 (cherry picked from commit 2cf141ed45b4f7b7754cb9525d987ff38495d789) --- diff --git a/third_party/waf/wafadmin/Tools/config_c.py b/third_party/waf/wafadmin/Tools/config_c.py index 3ab447ccf42..cdf3b3ebb68 100644 --- a/third_party/waf/wafadmin/Tools/config_c.py +++ b/third_party/waf/wafadmin/Tools/config_c.py @@ -106,7 +106,9 @@ def ret_msg(self, f, kw): @conf def validate_cfg(self, kw): if not 'path' in kw: - kw['path'] = 'pkg-config --errors-to-stdout --print-errors' + if not self.env.PKGCONFIG: + self.find_program('pkg-config', var='PKGCONFIG') + kw['path'] = self.env.PKGCONFIG # pkg-config version if 'atleast_pkgconfig_version' in kw: