/[ascend]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 1638 by jpye, Thu Nov 8 12:08:19 2007 UTC revision 1641 by jpye, Mon Nov 12 00:12:33 2007 UTC
# Line 912  print "DEFAULT_ASCENDSOLVERS =",env['DEF Line 912  print "DEFAULT_ASCENDSOLVERS =",env['DEF
912  # SPECIAL CONFIGURATION TESTS  # SPECIAL CONFIGURATION TESTS
913    
914  need_fortran = False  need_fortran = False
915    need_fortran_reasons = []
916    
917  #----------------  #----------------
918  # CC  # CC
# Line 955  def CheckCXX(context): Line 956  def CheckCXX(context):
956      context.Result(is_ok)      context.Result(is_ok)
957      return is_ok      return is_ok
958    
959        #----------------
960    
961    f77_test_text = """
962    C     Hello World in Fortran 77
963    
964          PROGRAM HELLO
965          PRINT*, 'Hello World!'
966          END  
967    """;
968    
969    def CheckF77(context):
970        context.Message("Checking Fortran 77 compiler ('%s')..." % context.env.get('FORTRAN'))
971        if not context.env.get('FORTRAN'):
972            context.Result('not found')
973            return False
974        is_ok = context.TryCompile(f77_test_text,".f")
975        context.Result(is_ok)
976        return is_ok
977        
978  #----------------  #----------------
979  # SWIG  # SWIG
980    
# Line 1810  conf = Configure(env Line 1828  conf = Configure(env
1828      , custom_tests = {      , custom_tests = {
1829          'CheckCC' : CheckCC          'CheckCC' : CheckCC
1830          , 'CheckCXX' : CheckCXX          , 'CheckCXX' : CheckCXX
1831            , 'CheckF77' : CheckF77
1832          , 'CheckMath' : CheckMath          , 'CheckMath' : CheckMath
1833          , 'CheckSwigVersion' : CheckSwigVersion          , 'CheckSwigVersion' : CheckSwigVersion
1834          , 'CheckPythonLib' : CheckPythonLib          , 'CheckPythonLib' : CheckPythonLib
# Line 2061  need_blas=False Line 2080  need_blas=False
2080    
2081  if with_lsode:  if with_lsode:
2082      need_fortran = True      need_fortran = True
2083        need_fortran_reasons.append("LSODE")
2084      need_blas=True      need_blas=True
2085    
2086  if need_blas:  if need_blas:
# Line 2070  if need_blas: Line 2090  if need_blas:
2090      else:      else:
2091          with_local_blas = True          with_local_blas = True
2092          need_fortran = True          need_fortran = True
2093            need_fortran_reasons.append("BLAS")
2094  else:  else:
2095      with_local_blas= False;      with_local_blas= False;
2096      without_local_blas_reason = "BLAS not required"      without_local_blas_reason = "BLAS not required"
# Line 2101  if need_fortran: Line 2122  if need_fortran:
2122          with_lsode=False;          with_lsode=False;
2123          without_lsode_reason="FORTRAN-77 required but not found"          without_lsode_reason="FORTRAN-77 required but not found"
2124    
2125    if need_fortran and not conf.CheckF77():
2126        print "Failed to build simple test file with your Fortran compiler."
2127        print "Check your compiler is installed and running correctly."
2128        print "You can set your Fortran compiler using the FORTRAN scons option."
2129        print "The fortran compiler is REQUIRED to build:",", ".join(need_fortran_reasons)
2130        print "Perhaps try examining the value of your WITH_SOLVERS option (remove LSODE, etc)."
2131        Exit(1)
2132    
2133  #else:  #else:
2134  #   print "FORTRAN not required"  #   print "FORTRAN not required"
2135    

Legend:
Removed from v.1638  
changed lines
  Added in v.1641

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