Changeset 2517 for trunk/SConstruct
- Timestamp:
- 05/15/12 15:17:10 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SConstruct
r2510 r2517 21 21 pass 22 22 return "" 23 24 def get_libdir(): 25 return os.path.basename(distutils.sysconfig.get_config_var('LIBDIR')) 26 27 LIBDIR = "lib' #get_libdir() 23 28 24 29 EnsureSConsVersion(1,0,0) … … 127 132 else: 128 133 conf.env.AppendUnique(CPPPATH=[conf.env["numpyincdir"]]) 129 # numpy 1.0 uses config.h; numpy >= 1.1 uses numpyconfig.h130 134 if conf.CheckHeader("numpy/numpyconfig.h"): 131 135 conf.env.Append(CPPDEFINES=["-DAIPS_USENUMPY"]) … … 136 140 conf.env.Append(CPPFLAGS=['-DHAVE_LIBPYRAP']) 137 141 142 if not conf.CheckLib("m"): 143 Exit(1) 138 144 # test for cfitsio 139 if not conf.CheckLib("m"): Exit(1)140 145 conf.env.AddCustomPackage('cfitsio') 141 146 libname = conf.env["cfitsiolib"] 142 if libname.find(".") > -1 and os.path.exists(libname): 143 conf.env.AppendUnique(LIBS=[env.File(libname)]) 144 else: 145 if not conf.CheckLibWithHeader(libname, 146 'fitsio.h', language='c'): 147 if not conf.CheckHeader("fitsio.h"): 148 #SuSE is being special 149 conf.env.AppendUnique(CPPPATH=['/usr/include/libcfitsio0']) 150 if not conf.CheckHeader("fitsio.h"): 151 Exit(1) 152 if libname.find(".") > -1 and os.path.exists(libname): 153 conf.env.AppendUnique(LIBS=[env.File(libname)]) 154 else: 155 if not conf.CheckLib(libname, language='c'): 147 156 Exit(1) 148 157 conf.env.AddCustomPackage('wcs') … … 156 165 157 166 conf.env.AddCustomPackage('rpfits') 158 if not conf.CheckLib(conf.env["rpfitslib"], language="c"): 167 if not conf.CheckLibWithHeader(conf.env["rpfitslib"], "RPFITS.h", 168 language="c"): 159 169 Exit(1) 160 170 … … 163 173 pth = os.path.join(p, "include", "casacore") 164 174 if os.path.exists(pth): 165 libpth = os.path.join(p, "lib")175 libpth = os.path.join(p, LIBDIR) 166 176 conf.env.AppendUnique(CPPPATH=[pth]) 167 177 break … … 169 179 "casa_coordinates", "casa_lattices", 170 180 "casa_fits", "casa_measures", "casa_scimath", 171 "casa_scimath_f", "casa_tables", 172 "casa_mirlib", "casa_casa"] 181 "casa_scimath_f", "casa_tables", "casa_casa"] 173 182 if conf.env["casacorestatic"]: 174 183 libs = [ env.File(os.path.join(libpth, "lib"+lib+".a")) \
Note:
See TracChangeset
for help on using the changeset viewer.