/[ascend]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1999 by jpye, Wed Feb 25 07:52:42 2009 UTC revision 2000 by jpye, Thu Feb 26 23:00:19 2009 UTC
# Line 1955  def CheckLModern(context): Line 1955  def CheckLModern(context):
1955      if not b:      if not b:
1956          context.Result(False)          context.Result(False)
1957          return False          return False
1958      is_ok = context.TryBuild(builder=b,text=lmodern_test_text,extension=".tex")      ff = context.env.get('LATEXFLAGS')
1959        context.env.Append(LATEXFLAGS=['-interaction=nonstopmode','-halt-on-error'])
1960        is_ok = context.TryBuild(builder=b,text=lmodern_test_text,extension=".latex")
1961        print "is_ok=",is_ok
1962        if ff is not None:
1963            context.env['LATEXFLAGS'] = ff
1964        else:
1965            del context.env['LATEXFLAGS']
1966      context.Result(is_ok)      context.Result(is_ok)
1967      return is_ok      return is_ok
1968    
# Line 2254  if with_lsode: Line 2261  if with_lsode:
2261      need_fortran_reasons.append("LSODE")      need_fortran_reasons.append("LSODE")
2262      need_blas=True      need_blas=True
2263    
2264    if with_ipopt:
2265        need_blas=True
2266    
2267  if need_blas:  if need_blas:
2268      if conf.CheckLib('blas'):      if conf.CheckLib('blas'):
2269          with_local_blas = False          with_local_blas = False
# Line 2270  else: Line 2280  else:
2280    
2281  if need_fortran:  if need_fortran:
2282      print "NEED FORTRAN"      print "NEED FORTRAN"
2283      conf.env.Tool('g77')      import SCons
2284      conf.env.Tool('gfortran')      if SCons.__version__[0:4]=="0.97":
2285            # Older SCons verions 0.97 (eg Ubuntu 8.04) doesn't have the 'gfortran' tool'.
2286            # On this system, the 'fortran' tool seems to detect gfortran OK.
2287            conf.env.Tool('fortran')
2288        else:
2289            conf.env.Tool('g77')
2290            conf.env.Tool('gfortran')
2291      detect_fortran = conf.env.Detect(['gfortran','g77'])      detect_fortran = conf.env.Detect(['gfortran','g77'])
2292      if detect_fortran:      if detect_fortran:
2293          # For some reason, g77 doesn't get detected properly on MinGW          # For some reason, g77 doesn't get detected properly on MinGW
# Line 2290  if need_fortran: Line 2306  if need_fortran:
2306              )              )
2307              conf.env.Append(BUILDERS={'Fortran':fortran_builder})              conf.env.Append(BUILDERS={'Fortran':fortran_builder})
2308          if platform.system()=="Linux":          if platform.system()=="Linux":
2309                print "APPARENTLY FORTRAN WAS DETECTED"
2310              conf.env.Append(SHFORTRANFLAGS=['-fPIC'])              conf.env.Append(SHFORTRANFLAGS=['-fPIC'])
2311      else:      else:
2312            print "FAILED FORTRAN DETECTION"
2313          with_lsode=False;          with_lsode=False;
2314          without_lsode_reason="FORTRAN-77 required but not found"          without_lsode_reason="FORTRAN-77 required but not found"
2315    else:
2316        print "FORTRAN WAS NOT FOUND TO BE REQUIRED"
2317    
2318  if need_fortran and conf.CheckF77() is False:  if need_fortran and conf.CheckF77() is False:
2319      print "Failed to build simple test file with your Fortran compiler."      print "Failed to build simple test file with your Fortran compiler."

Legend:
Removed from v.1999  
changed lines
  Added in v.2000

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22