Changeset 1138


Ignore:
Timestamp:
08/15/06 13:34:21 (18 years ago)
Author:
mar637
Message:

enabled custom library directories. Multiple level check for cfitsio

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SConstruct

    r1136 r1138  
    2020                            moduledir),
    2121                ("rpfitsdir", "Alternative rpfits location.", ""),
     22                ("cfitsioincdir", "Alternative cfitsio include dir", ""),
    2223                ("casadir", "Alternative casa location", ""),
    2324                EnumOption("mode", "The type of build.", "debug",
     
    3839env.SConsignFile()
    3940env.Append(CASAARCH = '', CASAROOT = '')
    40 
     41if (os.path.exists(env["cfitsioincdir"])):
     42    env.Append(CPPPATH=[env["cfitsioincdir"]])
     43env.AddCustomPath(env["rpfitsdir"])
    4144if not env.GetOption('clean'):
    4245    conf = Configure(env)
     
    5457    conf.env.AddCustomPath(env["rpfitsdir"])
    5558    if not conf.CheckLib('rpfits'): Exit(1)
    56     if not conf.CheckLibWithHeader('cfitsio', 'fitsio.h', 'c'): Exit(1)
     59    # cfitsio is either in include/ or /include/cfitsio
     60    # handle this
     61    if not conf.CheckLib(library='cfitsio', language='c'): Exit(1)
     62    if not conf.CheckHeader('fitsio.h', language='c'):
     63        if not conf.CheckHeader('cfitsio/fitsio.h', language='c'):
     64            Exit(1)
     65        else:
     66            conf.env.Append(CPPPATH=['/usr/include/cfitsio'])
    5767    if (sys.platform == "darwin"):
    5868        conf.env.Append(LIBS = ['-framework vecLib'])
Note: See TracChangeset for help on using the changeset viewer.