[cig-commits] commit: Updating to match stgUnderworld.
Mercurial
hg at geodynamics.org
Mon Nov 24 11:23:03 PST 2008
changeset: 75:66b9e4634053
user: LukeHodkinson
date: Thu Apr 10 05:41:23 2008 +0000
files: config/SConfig/Node.py config/SConfig/Package.py config/SConfig/packages/OSMesa.py config/SConfig/packages/OpenGL.py
description:
Updating to match stgUnderworld.
diff -r 28d250a083aa -r 66b9e4634053 config/SConfig/Node.py
--- a/config/SConfig/Node.py Thu Apr 10 02:34:02 2008 +0000
+++ b/config/SConfig/Node.py Thu Apr 10 05:41:23 2008 +0000
@@ -73,6 +73,10 @@ class Node(object):
result = check()
if not result:
break
+
+ # If everything succeeded, display configuration results.
+ if result:
+ self.display_configuration()
# Handle results.
self.restore_state(self.env, old_state)
@@ -178,6 +182,10 @@ class Node(object):
old_log.write(log)
return [res, log]
+ def display_configuration(self):
+ """Print out a brief summary of what options we found/used."""
+ pass
+
def push_state(self, state, append=False):
old = {}
copy = dict(state)
diff -r 28d250a083aa -r 66b9e4634053 config/SConfig/Package.py
--- a/config/SConfig/Package.py Thu Apr 10 02:34:02 2008 +0000
+++ b/config/SConfig/Package.py Thu Apr 10 05:41:23 2008 +0000
@@ -123,8 +123,11 @@ class Package(SConfig.Node):
def find_package(self):
"""Basic check routine for locating the package."""
result = False
- self.ctx.Display(' Searching locations:\n')
+ any_locs = False
for loc in self.generate_locations():
+ if not any_locs:
+ any_locs = True
+ self.ctx.Display(' Searching locations:\n')
self.ctx.Display(' %s\n' % str(loc))
result = self.check_location(loc)
if result:
@@ -135,6 +138,8 @@ class Package(SConfig.Node):
self.lib_dirs = loc[2]
self.fworks = loc[3]
break
+ if not any_locs:
+ self.ctx.Display(' No valid locations found\n')
return result
def check_location(self, location):
@@ -454,6 +459,11 @@ int main(int argc, char* argv[]) {
self.backup_variable(scons_env, 'LIBS', old_state)
scons_env.PrependUnique(LIBS=self.libs)
+ def display_configuration(self):
+ SConfig.Node.display_configuration(self)
+ if self.have_define:
+ self.ctx.Display(' Exporting: %s\n' % self.have_define)
+
def get_all_headers(self, headers):
if not self.result:
return
diff -r 28d250a083aa -r 66b9e4634053 config/SConfig/packages/OSMesa.py
--- a/config/SConfig/packages/OSMesa.py Thu Apr 10 02:34:02 2008 +0000
+++ b/config/SConfig/packages/OSMesa.py Thu Apr 10 05:41:23 2008 +0000
@@ -4,5 +4,6 @@ class OSMesa(SConfig.Package):
class OSMesa(SConfig.Package):
def __init__(self, scons_env, scons_opts, required=False, **kw):
SConfig.Package.__init__(self, scons_env, scons_opts, required, **kw)
+ self.header_sub_dir = ['GL']
+ self.headers = ['osmesa.h']
self.libraries = [['GL', 'GLU']]
- self.have_define = 'HAVE_MESA'
diff -r 28d250a083aa -r 66b9e4634053 config/SConfig/packages/OpenGL.py
--- a/config/SConfig/packages/OpenGL.py Thu Apr 10 02:34:02 2008 +0000
+++ b/config/SConfig/packages/OpenGL.py Thu Apr 10 05:41:23 2008 +0000
@@ -8,4 +8,3 @@ class OpenGL(SConfig.Package):
self.headers = [['gl.h', 'glu.h']]
self.libraries = [['GL', 'GLU']]
self.frameworks = [['OpenGL']]
- self.have_define = 'HAVE_GL'
More information about the CIG-COMMITS
mailing list