[cig-commits] commit: Updating to latest stgUnderworldE.
Mercurial
hg at geodynamics.org
Mon Nov 24 11:22:42 PST 2008
changeset: 20:ffc97d964063
user: LukeHodkinson
date: Fri Feb 08 04:20:33 2008 +0000
files: SConfigure SConsUtils
description:
Updating to latest stgUnderworldE.
diff -r f4235cccd937 -r ffc97d964063 SConfigure
--- a/SConfigure Fri Feb 08 03:56:24 2008 +0000
+++ b/SConfigure Fri Feb 08 04:20:33 2008 +0000
@@ -248,7 +248,201 @@ if not env.GetOption('clean'):
if not build_opts:
if not cfg.CheckPackage(petsc):
env.Exit()
-
+ env.Append(CPPDEFINES='HAVE_PETSC')
+ opts.Save('config.cache', env)
+ else:
+ petsc.add_options(opts)
+
+ #
+ # Setup OpenGL.
+ #
+
+ ogl = env.Package('OpenGL', env)
+ ogl.hdr_sub_dirs = ['GL']
+ ogl.hdrs = ['gl.h', 'glu.h']
+ ogl.libs = [('GL', 'GLU')]
+ ogl.frameworks = ['OpenGL']
+
+ if not build_opts:
+ if not cfg.CheckPackage(ogl):
+ env.Exit()
+ env.Append(CPPDEFINES='HAVE_GL')
+ opts.Save('config.cache', env)
+ else:
+ ogl.add_options(opts)
+
+ #
+ # Setup Mesa.
+ #
+
+ mesa = env.Package('OSMesa', env)
+ mesa.libs = ['OSMesa']
+
+ if not build_opts:
+ if not cfg.CheckPackage(mesa):
+ print " Couldn't find OSMesa - off screen"
+ print " rendering disabled."
+ else:
+ env.Append(CPPDEFINES='HAVE_MESA')
+ opts.Save('config.cache', env)
+ else:
+ mesa.add_options(opts)
+
+ #
+ # Setup SDL.
+ #
+
+ sdl = env.Package('SDL', env)
+ sdl.hdrs = ['SDL/SDL.h']
+ sdl.libs = ['SDL']
+ sdl.frameworks = ['SDL', 'Cocoa']
+
+ if not build_opts:
+ if cfg.CheckPackage(sdl):
+ env.Append(CPPDEFINES='HAVE_SDL')
+ opts.Save('config.cache', env)
+ else:
+ sdl.add_options(opts)
+
+ #
+ # Setup various image formats.
+ #
+
+ png = env.Package('libPNG', env)
+ png.hdrs = ['png.h']
+ png.libs = ['png']
+
+ if not build_opts:
+ if cfg.CheckPackage(png):
+ env.Append(CPPDEFINES='HAVE_PNG')
+ opts.Save('config.cache', env)
+ else:
+ png.add_options(opts)
+
+ jpeg = env.Package('libJPEG', env)
+ jpeg.hdrs = ['jpeglib.h']
+ jpeg.libs = ['jpeg']
+
+ if not build_opts:
+ if cfg.CheckPackage(jpeg):
+ env.Append(CPPDEFINES='HAVE_JPEG')
+ opts.Save('config.cache', env)
+ else:
+ jpeg.add_options(opts)
+
+ tiff = env.Package('libTIFF', env)
+ tiff.hdrs = ['tiff.h']
+ tiff.libs = ['tiff']
+
+ if not build_opts:
+ if cfg.CheckPackage(tiff):
+ env.Append(CPPDEFINES='HAVE_TIFF')
+ opts.Save('config.cache', env)
+ else:
+ tiff.add_options(opts)
+
+ #
+ # Setup libFAME.
+ #
+
+ fame = env.Package('libFAME', env)
+ fame.hdrs = ['fame.h']
+ fame.libs = ['fame']
+
+ if not build_opts:
+ if cfg.CheckPackage(fame):
+ env.Append(CPPDEFINES='HAVE_FAME')
+ opts.Save('config.cache', env)
+ else:
+ fame.add_options(opts)
+
+ #
+ # Setup libavcodec.
+ #
+
+ avc = env.Package('libavcodec', env)
+ avc.hdrs = ['ffmpeg/avcodec.h']
+ avc.libs = ['avcodec']
+
+ if not build_opts:
+ if cfg.CheckPackage(avc):
+ env.Append(CPPDEFINES='HAVE_AVCODEC')
+ opts.Save('config.cache', env)
+ else:
+ avc.add_options(opts)
+
+ #
+ # Setup HDF5.
+ #
+
+ hdf = env.Package('HDF5', env)
+ hdf.hdrs = ['hdf5.h']
+ hdf.libs = ['hdf5']
+
+ if not build_opts:
+ if cfg.CheckPackage(hdf):
+ env.Append(CPPDEFINES='HAVE_HDF5')
+ opts.Save('config.cache', env)
+ else:
+ hdf.add_options(opts)
+
+ #
+ # Check Fortran symbol type.
+ #
+
+ if not build_opts:
+ if not cfg.CheckFortranSymbol():
+ env.Exit()
+
+ #
+ # Extract revision number.
+ #
+
+ if not build_opts:
+ svnPath = Dir('.').srcnode().abspath
+ svnPath = os.path.join(svnPath, '.svn', 'entries')
+ if not os.path.exists(svnPath):
+ print "\nYou appear to be building the code from something"
+ print "that wasn't checked out of a repository. Bummer."
+ env.Exit()
+ f = file(svnPath, 'r')
+ f.readline()
+ f.readline()
+ f.readline()
+ ver = env['ESCAPE']('"' + str(int(f.readline())) + '"')
+ env.Append(CPPDEFINES=[('VERSION', ver)])
+ f.close()
+
+ #
+ # Add module extension to build commands.
+ #
+
+ if not build_opts:
+ ext = env['ESCAPE']('"' + env['SHLIBSUFFIX'][1:] + '"')
+ env.Append(CPPDEFINES=[('MODULE_EXT', ext)])
+
+ #
+ # Add the library directory.
+ #
+
+ if not build_opts:
+ libDir = os.path.join(Dir('.').abspath, 'build', 'lib')
+ libDir = env['ESCAPE']('"' + libDir + '"')
+ env.Append(CPPDEFINES=[('LIB_DIR', libDir)])
+
+ #
+ # Setup the dynamic library search paths.
+ #
+
+ if not build_opts:
+ env.Append(RPATH=[os.path.join(Dir('.').abspath, 'build', 'lib')])
+
+ # Finish the configuration.
+ if not build_opts:
+ env = cfg.Finish()
+
+
+"""
# Check that there isn't a conflict in PETSc's MPICH.
petsc_state = env['PACKAGES']['PETSc']
mpich_state = env['PACKAGES']['MPICH']
@@ -270,9 +464,9 @@ if not env.GetOption('clean'):
if mpi_inc_dir:
mpi_inc_dir = [d[len(env['INCPREFIX']):] \
for d in mpi_inc_dir.split(' ')]
- mpi_inc_dir = [os.path.realpath(d) for d in mpi_inc_dir]
+ state_hdr_dirs = [os.path.realpath(h) for h in state.hdr_dirs]
for dir in mpi_inc_dir:
- if dir not in mpich_state.hdr_dirs:
+ if os.path.realpath(dir) not in state_hdr_dirs:
okay = False
break
if not okay and not env['ignorePetscMpichConflict']:
@@ -296,196 +490,4 @@ if not env.GetOption('clean'):
elif not okay:
print ' Warning: PETSc is using a different MPI implementation'
print ' than the located version...\n'
-
- env.Append(CPPDEFINES='HAVE_PETSC')
- opts.Save('config.cache', env)
- else:
- petsc.add_options(opts)
-
- #
- # Setup OpenGL.
- #
-
- ogl = env.Package('OpenGL', env)
- ogl.hdr_sub_dirs = ['GL']
- ogl.hdrs = ['gl.h', 'glu.h']
- ogl.libs = [('GL', 'GLU')]
- ogl.frameworks = ['OpenGL']
-
- if not build_opts:
- if not cfg.CheckPackage(ogl):
- env.Exit()
- env.Append(CPPDEFINES='HAVE_GL')
- opts.Save('config.cache', env)
- else:
- ogl.add_options(opts)
-
- #
- # Setup Mesa.
- #
-
- mesa = env.Package('OSMesa', env)
- mesa.libs = ['OSMesa']
-
- if not build_opts:
- if not cfg.CheckPackage(mesa):
- print " Couldn't find OSMesa - off screen"
- print " rendering disabled."
- else:
- env.Append(CPPDEFINES='HAVE_MESA')
- opts.Save('config.cache', env)
- else:
- mesa.add_options(opts)
-
- #
- # Setup SDL.
- #
-
- sdl = env.Package('SDL', env)
- sdl.hdrs = ['SDL/SDL.h']
- sdl.libs = ['SDL']
- sdl.frameworks = ['SDL', 'Cocoa']
-
- if not build_opts:
- if cfg.CheckPackage(sdl):
- env.Append(CPPDEFINES='HAVE_SDL')
- opts.Save('config.cache', env)
- else:
- sdl.add_options(opts)
-
- #
- # Setup various image formats.
- #
-
- png = env.Package('libPNG', env)
- png.hdrs = ['png.h']
- png.libs = ['png']
-
- if not build_opts:
- if cfg.CheckPackage(png):
- env.Append(CPPDEFINES='HAVE_PNG')
- opts.Save('config.cache', env)
- else:
- png.add_options(opts)
-
- jpeg = env.Package('libJPEG', env)
- jpeg.hdrs = ['jpeglib.h']
- jpeg.libs = ['jpeg']
-
- if not build_opts:
- if cfg.CheckPackage(jpeg):
- env.Append(CPPDEFINES='HAVE_JPEG')
- opts.Save('config.cache', env)
- else:
- jpeg.add_options(opts)
-
- tiff = env.Package('libTIFF', env)
- tiff.hdrs = ['tiff.h']
- tiff.libs = ['tiff']
-
- if not build_opts:
- if cfg.CheckPackage(tiff):
- env.Append(CPPDEFINES='HAVE_TIFF')
- opts.Save('config.cache', env)
- else:
- tiff.add_options(opts)
-
- #
- # Setup libFAME.
- #
-
- fame = env.Package('libFAME', env)
- fame.hdrs = ['fame.h']
- fame.libs = ['fame']
-
- if not build_opts:
- if cfg.CheckPackage(fame):
- env.Append(CPPDEFINES='HAVE_FAME')
- opts.Save('config.cache', env)
- else:
- fame.add_options(opts)
-
- #
- # Setup libavcodec.
- #
-
- avc = env.Package('libavcodec', env)
- avc.hdrs = ['ffmpeg/avcodec.h']
- avc.libs = ['avcodec']
-
- if not build_opts:
- if cfg.CheckPackage(avc):
- env.Append(CPPDEFINES='HAVE_AVCODEC')
- opts.Save('config.cache', env)
- else:
- avc.add_options(opts)
-
- #
- # Setup HDF5.
- #
-
- hdf = env.Package('HDF5', env)
- hdf.hdrs = ['hdf5.h']
- hdf.libs = ['hdf5']
-
- if not build_opts:
- if cfg.CheckPackage(hdf):
- env.Append(CPPDEFINES='HAVE_HDF5')
- opts.Save('config.cache', env)
- else:
- hdf.add_options(opts)
-
- #
- # Check Fortran symbol type.
- #
-
- if not build_opts:
- if not cfg.CheckFortranSymbol():
- env.Exit()
-
- #
- # Extract revision number.
- #
-
- if not build_opts:
- svnPath = Dir('.').srcnode().abspath
- svnPath = os.path.join(svnPath, '.svn', 'entries')
- if not os.path.exists(svnPath):
- print "\nYou appear to be building the code from something"
- print "that wasn't checked out of a repository. Bummer."
- env.Exit()
- f = file(svnPath, 'r')
- f.readline()
- f.readline()
- f.readline()
- ver = env['ESCAPE']('"' + str(int(f.readline())) + '"')
- env.Append(CPPDEFINES=[('VERSION', ver)])
- f.close()
-
- #
- # Add module extension to build commands.
- #
-
- if not build_opts:
- ext = env['ESCAPE']('"' + env['SHLIBSUFFIX'][1:] + '"')
- env.Append(CPPDEFINES=[('MODULE_EXT', ext)])
-
- #
- # Add the library directory.
- #
-
- if not build_opts:
- libDir = os.path.join(Dir('.').abspath, 'build', 'lib')
- libDir = env['ESCAPE']('"' + libDir + '"')
- env.Append(CPPDEFINES=[('LIB_DIR', libDir)])
-
- #
- # Setup the dynamic library search paths.
- #
-
- if not build_opts:
- env.Append(RPATH=[os.path.join(Dir('.').abspath, 'build', 'lib')])
-
- # Finish the configuration.
- if not build_opts:
- env = cfg.Finish()
+"""
diff -r f4235cccd937 -r ffc97d964063 SConsUtils
--- a/SConsUtils Fri Feb 08 03:56:24 2008 +0000
+++ b/SConsUtils Fri Feb 08 04:20:33 2008 +0000
@@ -104,9 +104,9 @@ class PackageState(object):
def __init__(self, pkg, base_dir, hdr_dirs, lib_dirs,
libs, frameworks):
self.pkg = pkg
- self.base_dir = os.path.realpath(base_dir)
- self.hdr_dirs = [os.path.realpath(h) for h in hdr_dirs]
- self.lib_dirs = [os.path.realpath(l) for l in lib_dirs]
+ self.base_dir = base_dir
+ self.hdr_dirs = hdr_dirs
+ self.lib_dirs = lib_dirs
self.libs = libs
self.frameworks = frameworks
self.state = {}
More information about the CIG-COMMITS
mailing list