Changeset 1501 for trunk/SConstruct


Ignore:
Timestamp:
02/11/09 12:54:51 (16 years ago)
Author:
Malte Marquarding
Message:

support linking against pyrap

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SConstruct

    r1469 r1501  
    5656                ("rpfitslibdir", "The rpfits library location", None),
    5757#               ("rpfitsincdir", "The rpfits include location", None),
     58                ("pyraproot", "The root directory where libpyrap is installed",
     59                 None),
     60                ("pyraplib", "The name of the pyrap library", "pyrap"),
     61                ("pyraplibdir", "The directory where libpyrap is installed",
     62                 None),
     63                ("pyrapincdir", "The pyrap include location",
     64                 None),
     65                BoolVariable("enable_pyrap", "Use pyrap conversion library",
     66                             True),
     67
    5868                EnumVariable("mode", "The type of build.", "release",
    5969                           ["release","debug"], ignorecase=1),
     
    6575                           ["none", "pdf", "html"], ignorecase=1),
    6676                BoolVariable("apps", "Build cpp apps", False),
    67                 BoolVariable("alma", "Enable alma specific functionality", False)
     77                BoolVariable("alma", "Enable alma specific functionality",
     78                             False),
    6879                )
    6980
     
    113124
    114125    conf.env.AddCustomPackage('boost')
    115     if not conf.CheckLibWithHeader(env["boostlib"],
     126    if not conf.CheckLibWithHeader(conf.env["boostlib"],
    116127                                   'boost/python.hpp', language='c++'):
    117128        Exit(1)
     129
     130    conf.env.AddCustomPackage('pyrap')
     131    if  conf.env.get("enable_pyrap") and conf.CheckLib(conf.env["pyraplib"],
     132                                                       language='c++',
     133                                                       autoadd=0):
     134        conf.env.Append(CPPFLAGS=['-DHAVE_PYRAP'])
     135        conf.env.PrependUnique(LIBS=env['pyraplib'])
     136   
    118137    # test for cfitsio
    119138    if not conf.CheckLib("m"): Exit(1)
Note: See TracChangeset for help on using the changeset viewer.