/[ascend]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 739 by johnpye, Thu Jul 6 03:49:33 2006 UTC revision 740 by johnpye, Thu Jul 6 06:06:11 2006 UTC
# Line 409  if os.environ.get('OSTYPE')=='msys': Line 409  if os.environ.get('OSTYPE')=='msys':
409          , toolpath=['scons']          , toolpath=['scons']
410      )      )
411      env['IS_MINGW']=True      env['IS_MINGW']=True
412    
413    elif platform.system()=="Windows":
414        #print "ENVIRONMENT =",os.environ
415        print "ENV PATH =",os.environ['PATH']
416        
417        env = Environment(
418            ENV={
419                'PATH':os.environ['PATH']
420                ,'INCLUDE':os.environ['INCLUDE']
421                ,'LIB':os.environ['LIB']
422                ,'MSVS_IGNORE_IDE_PATHS':1
423            }
424            , tools = ['default','lex','yacc','fortran','swig','disttar','nsis']
425            , toolpath = ['scons']
426        )
427        env.Append(CPPDEFINES=['_CRT_SECURE_NO_DEPRECATE'])
428        #env.Append(CCFLAGS=['/Za'])
429        print "INCLUDE = ",env.get('INCLUDE')
430        print "LIB = ",env.get('LIB')
431        print "\nPATH =",env['ENV'].get('PATH')
432        
433  else:  else:
434      env = Environment(      env = Environment(
435          ENV=os.environ          ENV=os.environ
436          ,tools=['default','lex','yacc','fortran','swig','disttar','nsis']          , tools=['default','lex','yacc','fortran','swig','disttar','nsis']
437          , toolpath=['scons']          , toolpath=['scons']
438      )      )
439    
440  if platform.system()=='Windows' and env.has_key('MSVS'):  #if platform.system()=='Windows' and env.has_key('MSVS'):
441      print "INCLUDE =",env['ENV']['INCLUDE']      #print "INCLUDE =",env['ENV']['INCLUDE']
442      print "LIB =",env['ENV']['LIB']      #print "LIB =",env['ENV']['LIB']
443      print "PATH =",env['ENV']['PATH']      #print "PATH =",env['ENV']['PATH']
444      env.Append(CPPPATH=env['ENV']['INCLUDE'])      #env.Append(CPPPATH=env['ENV']['INCLUDE'].split(";"))
445      env.Append(LIBPATH=env['ENV']['LIB'])      #env.Append(LIBPATH=env['ENV']['LIB'].split(";"))
     env.Append(CPPDEFINES=['_CRT_SECURE_NO_DEPRECATE'])  
     env.Append(CCFLAGS=['/Za'])  
446    
447  opts.Update(env)  opts.Update(env)
448  opts.Save('options.cache',env)  opts.Save('options.cache',env)
# Line 910  conf = Configure(env Line 929  conf = Configure(env
929  #   , config_h = "config.h"  #   , config_h = "config.h"
930  )  )
931    
932    # stdio -- just to check that compiler is behaving
933    
934    if not conf.CheckHeader('stdio.h'):
935        print "Did not find 'stdio.h'! Check your compiler configuration."
936        Exit(1)
937    
938  # Math library  # Math library
939    
# Line 921  if need_libm: Line 945  if need_libm:
945    
946  # Where is 'isnan'?  # Where is 'isnan'?
947    
948  if not conf.CheckFunc('isnan'):  if not conf.CheckFunc('isnan') and not conf.CheckFunc('_isnan'):
949      print "Didn't find isnan"      print "Didn't find isnan"
950  #   Exit(1)  #   Exit(1)
951    
# Line 1064  if need_fortran: Line 1088  if need_fortran:
1088  # TODO: detect if dynamic libraries are possible or not  # TODO: detect if dynamic libraries are possible or not
1089    
1090  if platform.system()=="Windows" and env.has_key('MSVS'):  if platform.system()=="Windows" and env.has_key('MSVS'):
1091      if not conf.CheckHeader('windows.h') and env['PACKAGE_LINKING']=='DYNAMIC_PACKAGES':      _p = "C:\\Program Files\\Microsoft Platform SDK for Windows Server 2003 R2\\Include"
1092        if not os.path.exists(os.path.join(_p,"Windows.h")):
1093            print "WINDOWS.H NOT FOUND AT '%s'"%_p
1094        else:
1095            print "\n\nPATH '%s' OK\n\n" % _p
1096            conf.env.Append(CPPPATH=[_p])
1097    
1098        _found_windows_h = conf.CheckHeader('Windows.h')
1099    
1100        if not _found_windows_h:
1101            print "WINDOWS NOT FOUND IN '%s'" % conf.env.get('CPPPATH')
1102            Exit(1)
1103            
1104        if not _found_windows_h and env['PACKAGE_LINKING']=='DYNAMIC_PACKAGES':
1105          print "Reverting to STATIC_PACKAGES since windows.h is not available. Probably you "\          print "Reverting to STATIC_PACKAGES since windows.h is not available. Probably you "\
1106              +"need to install the Microsoft Windows Server 2003 Platform SDK, or similar."              +"need to install the Microsoft Windows Server 2003 Platform SDK, or similar."
1107          env['PACKAGE_LINKING']='STATIC_PACKAGES'          env['PACKAGE_LINKING']='STATIC_PACKAGES'
1108                
1109      if with_python and not conf.CheckHeader(['basetsd.h','BaseTsd.h']):      if with_python and not conf.CheckHeader(['basetsd.h','BaseTsd.h']):
1110          with_python = 0;          with_python = 0;
1111          without_python_reason = "Header file 'basetsd.h' not found. Install the MS Platform SDK."          without_python_reason = "Header file 'basetsd.h' not found. Install the MS Platform SDK."

Legend:
Removed from v.739  
changed lines
  Added in v.740

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