From 8c115aa247d4a2cfee5d35c5fdd6f56951060c6c Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Mon, 31 Jan 2011 10:46:30 -0800 Subject: [PATCH] scons: Gracefully handle pkg-config errors with libdrm_radeon. Print warnings and continue build. --- src/gallium/winsys/r600/drm/SConscript | 7 ++++++- src/gallium/winsys/radeon/drm/SConscript | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/gallium/winsys/r600/drm/SConscript b/src/gallium/winsys/r600/drm/SConscript index f97434e995d..cc9a06a2393 100644 --- a/src/gallium/winsys/r600/drm/SConscript +++ b/src/gallium/winsys/r600/drm/SConscript @@ -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( diff --git a/src/gallium/winsys/radeon/drm/SConscript b/src/gallium/winsys/radeon/drm/SConscript index 80816621848..4ddb0919f6a 100644 --- a/src/gallium/winsys/radeon/drm/SConscript +++ b/src/gallium/winsys/radeon/drm/SConscript @@ -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( -- 2.30.2