From 3a5cf443c81f5313d424ebd490cb34398a49db59 Mon Sep 17 00:00:00 2001 From: Uri Simchoni Date: Thu, 19 Jan 2017 07:46:57 +0200 Subject: [PATCH] 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 --- third_party/waf/wafadmin/Tools/config_c.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/third_party/waf/wafadmin/Tools/config_c.py b/third_party/waf/wafadmin/Tools/config_c.py index 3ab447c..cdf3b3e 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: -- 2.9.3