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 <zentaro@google.com> for
pointing that out and proposing the fix.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12529
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jan 25 04:23:00 CET 2017 on sn-devel-144
@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: