/[ascend]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 501 by johnpye, Tue Apr 18 12:40:59 2006 UTC revision 502 by johnpye, Tue Apr 18 12:57:30 2006 UTC
# Line 241  else: Line 241  else:
241      Tool('fortran')(env)      Tool('fortran')(env)
242      Tool('swig')(env)      Tool('swig')(env)
243    
 env['HAVE_LEX']=True  
 env['HAVE_YACC']=True  
   
244  if platform.system()=='Windows' and env.has_key('MSVS'):  if platform.system()=='Windows' and env.has_key('MSVS'):
245      print "INCLUDE =",env['ENV']['INCLUDE']      print "INCLUDE =",env['ENV']['INCLUDE']
246      print "LIB =",env['ENV']['LIB']      print "LIB =",env['ENV']['LIB']
# Line 427  def CheckExtLib(context,libname,text,ext Line 424  def CheckExtLib(context,libname,text,ext
424      return is_ok      return is_ok
425    
426  #----------------  #----------------
427    # GCC
428    
429    gcc_test_text = """
430    #ifndef __GNUC__
431    # error "Not using GCC"
432    #endif
433    
434    int main(void){
435        return __GNUC__;
436    }
437    """
438    
439    def CheckGcc(context):
440        context.Message("Checking for GCC... ")
441        is_ok = context.TryCompile(gcc_test_text,".c")
442        context.Result(is_ok)
443        return is_ok
444    
445    #----------------
446  # GCC VISIBILITY feature  # GCC VISIBILITY feature
447    
448  gccvisibility_test_text = """  gccvisibility_test_text = """
# Line 447  def CheckGccVisibility(context): Line 463  def CheckGccVisibility(context):
463      is_ok = context.TryCompile(gccvisibility_test_text,".c")      is_ok = context.TryCompile(gccvisibility_test_text,".c")
464      context.Result(is_ok)      context.Result(is_ok)
465      return is_ok      return is_ok
466        
467    #----------------
468    # YACC
469    
470    yacc_test_text = """
471    %start ROOT
472       %token MSG
473       %%
474    
475       ROOT:
476         MSG { print("HELLO"); }
477       ;
478    """
479    
480    def CheckYacc(context):
481        context.Message("Checking for Yacc... ")
482        is_ok = context.TryCompile(yacc_test_text,".y")
483        context.Result(is_ok)
484        return is_ok
485    
486  #----------------  #----------------
487  # CUnit test  # CUnit test
488    
# Line 557  conf = Configure(env Line 592  conf = Configure(env
592          , 'CheckTclVersion' : CheckTclVersion          , 'CheckTclVersion' : CheckTclVersion
593          , 'CheckTk' : CheckTk          , 'CheckTk' : CheckTk
594          , 'CheckTkVersion' : CheckTkVersion          , 'CheckTkVersion' : CheckTkVersion
595            , 'CheckGcc' : CheckGcc
596          , 'CheckGccVisibility' : CheckGccVisibility          , 'CheckGccVisibility' : CheckGccVisibility
597            , 'CheckYacc' : CheckYacc
598  #       , 'CheckIsNan' : CheckIsNan  #       , 'CheckIsNan' : CheckIsNan
599  #       , 'CheckCppUnitConfig' : CheckCppUnitConfig  #       , 'CheckCppUnitConfig' : CheckCppUnitConfig
600      }      }
# Line 579  if not conf.CheckFunc('isnan'): Line 616  if not conf.CheckFunc('isnan'):
616    
617  # GCC visibility  # GCC visibility
618    
619  if conf.CheckGccVisibility():  if conf.CheckGcc():
620      conf.env['HAVE_GCCVISIBILITY']=True;      conf.env['HAVE_GCC']=True;
621        if conf.CheckGccVisibility():
622            conf.env['HAVE_GCCVISIBILITY']=True;
623      conf.env.Append(CCFLAGS=['-fvisibility=hidden'])      conf.env.Append(CCFLAGS=['-fvisibility=hidden'])
624    
625    
626    # YACC
627    
628    
629    if conf.CheckYacc():
630        conf.env['HAVE_YACC']=True
631    
632    conf.env['HAVE_LEX']=True
633    
634  # Tcl/Tk  # Tcl/Tk
635    
636  if conf.CheckTcl():  if conf.CheckTcl():

Legend:
Removed from v.501  
changed lines
  Added in v.502

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