scons: Check for pkg-config before trying to use it
authorJakob Bornecrantz <jakob@vmware.com>
Thu, 4 Nov 2010 20:47:13 +0000 (20:47 +0000)
committerJakob Bornecrantz <jakob@vmware.com>
Fri, 5 Nov 2010 20:58:49 +0000 (20:58 +0000)
Silences warning about missing packages

scons/gallium.py

index 7374cf58d3b1c7a772b20a9ecfff664081f5bb5a..36f1831af89dfc7ba54e2a30c1bd795332bd66f6 100644 (file)
@@ -114,6 +114,9 @@ def pkg_config_modules(env, name, modules):
     if not env.Detect('pkg-config'):
         return
 
+    if subprocess.call(["pkg-config", "--exists", ' '.join(modules)]) != 0:
+        return
+
     # Put -I and -L flags directly into the environment, as these don't affect
     # the compilation of targets that do not use them
     try: