scons: Gracefully handle pkg-config errors with libdrm_radeon.
authorVinson Lee <vlee@vmware.com>
Mon, 31 Jan 2011 18:46:30 +0000 (10:46 -0800)
committerVinson Lee <vlee@vmware.com>
Mon, 31 Jan 2011 18:50:06 +0000 (10:50 -0800)
Print warnings and continue build.

src/gallium/winsys/r600/drm/SConscript
src/gallium/winsys/radeon/drm/SConscript

index f97434e995df9b780fea08e35a7eb971e3225459..cc9a06a239341d4ffb889298aa6d7c369155e5ea 100644 (file)
@@ -13,7 +13,12 @@ r600_sources = [
     'r600_bomgr.c',
 ]
 
-env.ParseConfig('pkg-config --cflags libdrm_radeon')
+try:
+    env.ParseConfig('pkg-config --cflags libdrm_radeon')
+except OSError:
+    print 'warning: not building r600g'
+    Return()
+
 env.Append(CPPPATH = '#/src/gallium/drivers/r600')
 
 r600winsys = env.ConvenienceLibrary(
index 80816621848e2afc223524b5ad366c09d4f18c9b..4ddb0919f6a134c5268bbf65f097345f3abd6014 100644 (file)
@@ -9,7 +9,12 @@ radeon_sources = [
     'radeon_r300.c',
 ]
 
-env.ParseConfig('pkg-config --cflags libdrm_radeon')
+try:
+    env.ParseConfig('pkg-config --cflags libdrm_radeon')
+except:
+    print 'warning: not building r300g'
+    Return()
+
 env.Append(CPPPATH = '#/src/gallium/drivers/r300')
 
 radeonwinsys = env.ConvenienceLibrary(