scons: don't assume llvm is always present
authorZack Rusin <zackr@vmware.com>
Tue, 9 Feb 2010 05:00:35 +0000 (00:00 -0500)
committerZack Rusin <zackr@vmware.com>
Tue, 9 Feb 2010 05:00:35 +0000 (00:00 -0500)
SConstruct

index 76ab9025e23e44a1c69746f7e44a790de33453af..fa67d14b79562180bf810ab109891165e17823a3 100644 (file)
@@ -170,8 +170,11 @@ if dri:
 if drawllvm:
        # See also http://www.scons.org/wiki/UsingPkgConfig
         # currently  --ldflags --libsdisabled since the driver will force the correct linkage
-       env.ParseConfig('llvm-config --cflags backend bitreader engine instrumentation interpreter ipo')
-       env.Append(CPPDEFINES = ['DRAW_LLVM'])
+        env.Tool('llvm')
+        if not env.has_key('LLVM_VERSION'):
+           drawllvm = False
+       else:
+           env.Append(CPPDEFINES = ['DRAW_LLVM'])
 
 # libGL
 if platform in ('linux', 'freebsd', 'darwin'):