scons: Use libdrm options only where needed.
authorJosé Fonseca <jfonseca@vmware.com>
Sat, 10 Apr 2010 01:00:33 +0000 (02:00 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Sun, 11 Apr 2010 08:17:34 +0000 (17:17 +0900)
Prevents needless recompiles when switching dri=yes to no.

SConstruct
src/gallium/state_trackers/dri/drm/SConscript

index 56d88cc1cc08f1fc8d445cb8b0ad90c74370937f..8b7ae7d112bed9aa21fe8a20b1338868dbae7ee5 100644 (file)
@@ -167,16 +167,6 @@ if platform in ('posix', 'linux', 'freebsd', 'darwin'):
                'dl',
        ])
 
-# DRI
-if dri:
-       env.ParseConfig('pkg-config --cflags --libs libdrm')
-       env.Append(CPPDEFINES = [
-               ('USE_EXTERNAL_DXTN_LIB', '1'), 
-               'IN_DRI_DRIVER',
-               'GLX_DIRECT_RENDERING',
-               'GLX_INDIRECT_RENDERING',
-       ])
-
 # LLVM support in the Draw module
 if drawllvm:
     env.Append(CPPDEFINES = ['DRAW_LLVM'])
index b9726ee3113a7e92eedc244e60b62b12d178bee5..1dfaa402f2d7d2775f6cccad3877808d7023cae5 100644 (file)
@@ -7,6 +7,8 @@ if env['dri']:
 
     env = env.Clone()
 
+    env.ParseConfig('pkg-config --cflags --libs libdrm')
+
     env.Append(CPPPATH = [
         '#/src/mesa',
        '#/src/gallium/state_trackers/dri/common',