[cig-commits] commit: Merging minor changes from stgUnderworldE.

Mercurial hg at geodynamics.org
Mon Nov 24 11:22:46 PST 2008


changeset:   28:988d32ff5aa4
user:        LukeHodkinson
date:        Tue Feb 12 04:41:40 2008 +0000
files:       SConfigure SConsUtils
description:
Merging minor changes from stgUnderworldE.


diff -r 5e01068dc525 -r 988d32ff5aa4 SConfigure
--- a/SConfigure	Tue Feb 12 03:19:04 2008 +0000
+++ b/SConfigure	Tue Feb 12 04:41:40 2008 +0000
@@ -196,6 +196,7 @@ if not env.GetOption('clean'):
 
     if not build_opts:
         if not cfg.CheckPackage(mpich):
+            mpich.print_opts_help()
             env.Exit()
         opts.Save('config.cache', env)
     else:
@@ -213,6 +214,7 @@ if not env.GetOption('clean'):
 
     if not build_opts:
         if not cfg.CheckPackage(libxml):
+            libxml.print_opts_help()
             env.Exit()
         opts.Save('config.cache', env)
     else:
@@ -230,6 +232,7 @@ if not env.GetOption('clean'):
 
     if not build_opts:
         if not cfg.CheckPackage(lapack):
+            lapack.print_opts_help()
             env.Exit()
         opts.Save('config.cache', env)
     else:
@@ -256,6 +259,7 @@ if not env.GetOption('clean'):
 
     if not build_opts:
         if not cfg.CheckPackage(petsc):
+            petsc.print_opts_help()
             env.Exit()
         env.Append(CPPDEFINES='HAVE_PETSC')
         opts.Save('config.cache', env)
@@ -298,6 +302,7 @@ if not env.GetOption('clean'):
 
     if not build_opts:
         if not cfg.CheckPackage(ogl):
+            ogl.print_opts_help()
             env.Exit()
         env.Append(CPPDEFINES='HAVE_GL')
         opts.Save('config.cache', env)
@@ -313,8 +318,8 @@ if not env.GetOption('clean'):
 
     if not build_opts:
         if not cfg.CheckPackage(mesa):
-            print "  Couldn't find OSMesa - off screen"
-            print "    rendering disabled."
+            print "   Couldn't find OSMesa - off screen"
+            print "      rendering disabled."
         else:
             env.Append(CPPDEFINES='HAVE_MESA')
         opts.Save('config.cache', env)
@@ -414,6 +419,7 @@ if not env.GetOption('clean'):
 
     if not build_opts:
         if not cfg.CheckPackage(hdf):
+            hdf.print_opts_help()
             env.Exit()
         env.Append(CPPDEFINES='HAVE_HDF5')
         opts.Save('config.cache', env)
@@ -426,6 +432,8 @@ if not env.GetOption('clean'):
 
     if not build_opts:
         if not cfg.CheckFortranSymbol():
+            print '   Failed to compile and run a simple fortran program,'
+            print "   please check 'config.log' for the cause of the error."
             env.Exit()
 
     #
diff -r 5e01068dc525 -r 988d32ff5aa4 SConsUtils
--- a/SConsUtils	Tue Feb 12 03:19:04 2008 +0000
+++ b/SConsUtils	Tue Feb 12 04:41:40 2008 +0000
@@ -206,7 +206,7 @@ return 0;
 
         # Add any frameworks that may exist representing this package here.
         self.frameworks = []
-	self.framework_hdr_prefix = ''
+        self.framework_hdr_prefix = ''
 
         # Set this flag if RPATH's are needed for this package.
         self.use_rpath = False
@@ -430,9 +430,9 @@ return 0;
                     lib_dir = [h for h in lib_dir \
                                    if h not in self.def_lib_dirs]
 
-		# If we have nothing, skip.
-		if not (base and hdr_dir and lib_dir):
-		    continue
+                # If we have nothing, skip.
+                if not (base or hdr_dir or lib_dir):
+                    continue
 
                 # Permute with libraries.
                 for l in libs:
@@ -448,18 +448,18 @@ return 0;
                         if not self.check_state(state):
                             continue
 
-		    # If any of the directories don't exist, skip.
-		    okay = True
-		    for h in hdr_dir:
-		    	if not os.path.exists(h):
-			    okay = False
-			    break
-		    for l in lib_dir:
-		    	if not os.path.exists(l):
-			    okay = False
-			    break
-		    if not okay:
-		    	continue
+					# If any of the directories don't exist, skip.
+                    okay = True
+                    for h in hdr_dir:
+                        if not os.path.exists(h):
+                            okay = False
+                            break
+                    for l in lib_dir:
+                        if not os.path.exists(l):
+                            okay = False
+                            break
+                    if not okay:
+                        continue
 
                     # Store in state array.
                     self.states += [state]
@@ -550,6 +550,30 @@ self.env_opts."""
             if val:
                 self.opts[k] = val
 
+    def print_opts_help(self):
+        print '   Was unable to locate a working version of package:'
+        print '      %s\n' % self.name
+        print "   Please check 'config.log' for the cause of the failure.\n"
+        if len(self.cmd_opts):
+            print '   You could try specifying any of the following command'
+            print '   line options:'
+            for c in self.cmd_opts.itervalues():
+                print '      %s' % c
+            print ''
+        if len(self.env_opts):
+            if len(self.cmd_opts):
+                print '   Or you',
+            else:
+                print '   You',
+            print ' could try setting any of the following environment'
+            print '   variables (if your platform supports doing so):'
+            for e in self.env_opts.itervalues():
+                print '      %s' % e
+            print ''
+        if len(self.cmd_opts) or len(self.env_opts):
+            print "   Please run 'scons -h' to see more details on using"
+            print '   these options.\n'
+
 def CheckPackage(ctx, pkg):
     env = ctx.env
     ctx.Message('Checking for package %s ... ' % pkg.name)



More information about the CIG-COMMITS mailing list