Mesa (master): scons: Check for pkg-config before trying to use it

Jakob Bornecrantz wallbraker at kemper.freedesktop.org
Fri Nov 5 20:59:18 UTC 2010


Module: Mesa
Branch: master
Commit: 98d6ed87421cd8a8a43b061a6ba634b8cbbec086
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=98d6ed87421cd8a8a43b061a6ba634b8cbbec086

Author: Jakob Bornecrantz <jakob at vmware.com>
Date:   Thu Nov  4 20:47:13 2010 +0000

scons: Check for pkg-config before trying to use it

Silences warning about missing packages

---

 scons/gallium.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/scons/gallium.py b/scons/gallium.py
index 7374cf5..36f1831 100644
--- a/scons/gallium.py
+++ b/scons/gallium.py
@@ -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:




More information about the mesa-commit mailing list