Changeset 1090


Ignore:
Timestamp:
07/28/06 11:42:22 (18 years ago)
Author:
mar637
Message:

added more auto-detection of libs

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/SConstruct

    r1082 r1090  
    1010opts.Add("moduledir", "The python module path (site-packages))", moduledir)
    1111
     12def addCasaLibs(env):
     13    casalibs = "casav atnf images ms components coordinates \
     14                lattices fits measures measures_f \
     15                tables scimath scimath_f casa wcs".split()
     16    env.Prepend( LIBS =  casalibs )
     17    # Explicit templates in casa
     18    env.Append( CPPFLAGS = ['-DAIPS_NO_TEMPLATE_SRC'] )
    1219
    1320def checkCasa(conf, path=None):
     
    1926        conf.env.Append(CASAARCH = casa[1])
    2027        conf.env.Append(CASAROOT = casa[0])
     28        addCasaLibs(conf.env)
    2129        conf.Result('yes')
    2230        return True
     
    3341            conf.env.Append(CASAARCH = casaarch)
    3442            conf.env.Append(CASAROOT = p)
     43            addCasaLibs(conf.env)
    3544            conf.Result('yes')
    3645            return True
     
    4958    if not conf.CheckHeader(pyvers+'/Python.h', language='c'): Exit(1)
    5059    else: conf.env.Append(CPPPATH=[distutils.sysconfig.get_python_inc()])
    51         #if not conf.CheckHeader(['boost/python.hpp'], language="C++"): Exit(1)
     60    if not conf.CheckHeader(['boost/python.hpp'], language="C++"): Exit(1)
    5261    if not conf.CheckLib(library='boost_python', language='c++'): Exit(1)
    53 # #     if not conf.CheckLib('g2c'): Exit(1)
    54 # #     if not conf.CheckLib('lapack'): Exit(1)
    55 # #     if not conf.CheckLib('blas'): Exit(1)
    56 # #     if not conf.CheckLib('stdc++',language='c++'): Exit(1)
     62    if not conf.CheckLib('rpfits'): Exit(1)
     63    if not conf.CheckLib('cfitsio'): Exit(1)
     64    if not conf.CheckLib('g2c'): Exit(1)
     65    if not conf.CheckLib('lapack'): Exit(1)
     66    if not conf.CheckLib('blas'): Exit(1)
     67    if not conf.CheckLib('stdc++',language='c++'): Exit(1)
    5768    if not conf.CheckCasa(): Exit(1)
    5869    env = conf.Finish()
     70# general CPPFLAGS
    5971env.Append(CPPFLAGS='-O3 -Wno-long-long'.split())
     72# 64bit flags
    6073if  platform.architecture()[0] == '64bit':
    61     env.Append(CPPFLAGS='-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D__x86_64__ -DAIPS_64B -DAIPS_GCC3'.split())
     74    env.Append(CPPFLAGS='-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D__x86_64__ -DAIPS_64B'.split())
    6275
    63 #env.BuildDir('build', 'src')
    6476Export("env")
    6577so = env.SConscript("src/SConscript", build_dir="build", duplicate=0)
    6678env.Install(moduledir, so )
     79env.Install(moduledir, ["python/__init__.py"] )
    6780env.Alias('install',moduledir)
  • trunk/src/SConscript

    r1082 r1090  
    5757""".split()
    5858
    59 # CASA
    60 casalibs = """
    61 casav
    62 atnf images ms components coordinates
    63 lattices fits measures measures_f
    64 tables scimath scimath_f casa
    65 wcs
    66 rpfits
    67 """.split()
    6859
    6960# OTHER
    70 genlibs = """
    71 g2c stdc++ lapack blas
    72 """.split()
     61#genlibs = """
     62#g2c stdc++ lapack blas
     63#""".split()
    7364
    74 myenv.Append( LIBS =  casalibs )
    75 myenv.Append( LIBS =  ['cfitsio_lfs'] )
    76 myenv.Append( LIBS =  genlibs )
     65#myenv.Append( LIBS =  ['cfitsio_lfs'] )
     66#myenv.Append( LIBS =  genlibs )
    7767
    78 # Explicit templates in casa
    79 myenv.Append( CPPFLAGS = ['-DAIPS_NO_TEMPLATE_SRC'] )
    8068
    8169casalibd = os.path.join(myenv['CASAROOT'],myenv['CASAARCH'],'lib')
Note: See TracChangeset for help on using the changeset viewer.