2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-26 11:51:20 +01:00

Tools: c_config: one more fix for the path, which can also be a string...

This commit is contained in:
Jérôme Carretero 2013-09-05 00:12:45 -04:00
parent 89358e70d4
commit 8076e8d52e

View File

@ -268,12 +268,14 @@ def exec_cfg(self, kw):
:type define_variable: dict(string: string)
"""
path = Utils.to_list(kw['path'])
def define_it():
self.define(self.have_define(kw.get('uselib_store', kw['package'])), 1, 0)
# pkg-config version
if 'atleast_pkgconfig_version' in kw:
cmd = kw['path'] + ['--atleast-pkgconfig-version=%s' % kw['atleast_pkgconfig_version']]
cmd = path + ['--atleast-pkgconfig-version=%s' % kw['atleast_pkgconfig_version']]
self.cmd_and_log(cmd)
if not 'okmsg' in kw:
kw['okmsg'] = 'yes'
@ -283,7 +285,7 @@ def exec_cfg(self, kw):
for x in cfg_ver:
y = x.replace('-', '_')
if y in kw:
self.cmd_and_log(kw['path'] + ['--%s=%s' % (x, kw[y]), kw['package']])
self.cmd_and_log(path + ['--%s=%s' % (x, kw[y]), kw['package']])
if not 'okmsg' in kw:
kw['okmsg'] = 'yes'
define_it()
@ -291,11 +293,11 @@ def exec_cfg(self, kw):
# retrieving the version of a module
if 'modversion' in kw:
version = self.cmd_and_log(kw['path'] + ['--modversion', kw['modversion']]).strip()
version = self.cmd_and_log(path + ['--modversion', kw['modversion']]).strip()
self.define('%s_VERSION' % Utils.quote_define_name(kw.get('uselib_store', kw['modversion'])), version)
return version
lst = [] + kw['path']
lst = [] + path
defi = kw.get('define_variable', None)
if not defi: