summaryrefslogtreecommitdiffstats
path: root/scons/custom.py
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2012-02-07 11:17:35 +0000
committerJosé Fonseca <[email protected]>2012-02-07 11:41:08 +0000
commit2470e918cc29e5d057a28551ce9c15e7d83fab7e (patch)
tree9d0673c8ea17242d6391534d8a0e7cfb7c986093 /scons/custom.py
parentf763ad51302a8b3517e85ae7f2ee94d40b1e0326 (diff)
scons: Require same pkg-config versions as configure.
Diffstat (limited to 'scons/custom.py')
-rw-r--r--scons/custom.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/scons/custom.py b/scons/custom.py
index 08073162e74..cc953bd999a 100644
--- a/scons/custom.py
+++ b/scons/custom.py
@@ -174,6 +174,9 @@ def _pkg_check_modules(env, name, modules):
if subprocess.call(["pkg-config", "--exists", ' '.join(modules)]) != 0:
return
+ # Strip version expressions from modules
+ modules = [module.split(' ', 1)[0] for module in modules]
+
# Other flags may affect the compilation of unrelated targets, so store
# them with a prefix, (e.g., XXX_CFLAGS, XXX_LIBS, etc)
try:
@@ -189,7 +192,7 @@ def _pkg_check_modules(env, name, modules):
def pkg_check_modules(env, name, modules):
- sys.stdout.write('Checking for %s...' % name)
+ sys.stdout.write('Checking for %s (%s)...' % (name, ' '.join(modules)))
_pkg_check_modules(env, name, modules)
result = env['HAVE_' + name]
sys.stdout.write(' %s\n' % ['no', 'yes'][int(bool(result))])