/[ascend]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 560 by johnpye, Wed May 3 00:01:46 2006 UTC revision 561 by johnpye, Thu May 4 07:35:43 2006 UTC
# Line 150  opts.Add( Line 150  opts.Add(
150  # What is the name of the Tcl lib?  # What is the name of the Tcl lib?
151  opts.Add(  opts.Add(
152      'TCL_LIB'      'TCL_LIB'
153      ,"Name of Tcl lib (eg 'tcl' or 'tcl83'), for full path to static library"      ,"Name of Tcl lib (eg 'tcl' or 'tcl83'), for full path to static library (if STATIC_TCLTK is set)"
154      ,default_tcl_lib      ,default_tcl_lib
155  )  )
156    
# Line 559  def CheckCUnit(context): Line 559  def CheckCUnit(context):
559  #----------------  #----------------
560  # Tcl test  # Tcl test
561    
562    # TCL and TK required version 8.1, 8.2, 8.3, or 8.4:
563    tcltk_minor_newest_acceptable = 4
564    tcltk_major_required = 8
565    
566  tcl_check_text = r"""  tcl_check_text = r"""
567  #include <tcl.h>  #include <tcl.h>
568  #include <stdio.h>  #include <stdio.h>
# Line 581  def CheckTclVersion(context): Line 585  def CheckTclVersion(context):
585          return 0          return 0
586    
587      major,minor,patch = tuple([int(i) for i in output.split(".")])      major,minor,patch = tuple([int(i) for i in output.split(".")])
588      if major != 8 or minor > 3:      if major != tcltk_major_required or minor > tcltk_minor_newest_acceptable:
589          context.Result(output+" (bad version)")          context.Result(output+" (bad version)")
590          # bad version          # bad version
591          return 0          return 0
# Line 614  def CheckTkVersion(context): Line 618  def CheckTkVersion(context):
618      if not is_ok:      if not is_ok:
619          context.Result("failed to run check")          context.Result("failed to run check")
620          return 0          return 0
     context.Result(output)  
621    
622      major,minor,patch = tuple([int(i) for i in output.split(".")])      major,minor,patch = tuple([int(i) for i in output.split(".")])
623      if major != 8 or minor > 3:      if major != tcltk_major_required or minor > tcltk_minor_newest_acceptable:
624          # bad version          # bad version
625            context.Result(output+" (bad version)")
626          return 0          return 0
627                    
628      # good version      # good version
629        context.Result(output+" (good)")
630      return 1      return 1
631    
632  #----------------  #----------------
# Line 723  if conf.CheckTcl(): Line 728  if conf.CheckTcl():
728      if with_tcltk and conf.CheckTclVersion():      if with_tcltk and conf.CheckTclVersion():
729          if conf.CheckTk():          if conf.CheckTk():
730              if with_tcltk and conf.CheckTkVersion():              if with_tcltk and conf.CheckTkVersion():
731                  if conf.CheckTkTable():                  if env['STATIC_TCLTK']:
732                      pass                      if conf.CheckTkTable():
733                  else:                          pass
734                      without_tcltk_reason = "TkTable not found"                      else:
735                      with_tcltk = False                          without_tcltk_reason = "TkTable not found"
736                            with_tcltk = False
737              else:              else:
738                  without_tcltk_reason = "Require Tk version <= 8.3. See 'scons -h'"                  without_tcltk_reason = "Require Tk version <= 8.4. See 'scons -h'"
739                  with_tcltk = False                  with_tcltk = False
740          else:          else:
741              without_tcltk_reason = "Tk not found."              without_tcltk_reason = "Tk not found."
742              with_tcltk = False              with_tcltk = False
743      else:      else:
744          without_tcltk_reason = "Require Tcl <= 8.3 Tcl."          without_tcltk_reason = "Require Tcl <= 8.4 Tcl."
745          with_tcltk = False          with_tcltk = False
746    
747  else:  else:
# Line 1252  if platform.system()=="Linux": Line 1258  if platform.system()=="Linux":
1258    
1259  env['DISTTAR_FORMAT']='bz2'  env['DISTTAR_FORMAT']='bz2'
1260  env.Append(  env.Append(
1261      DISTTAR_EXCLUDEEXTS=['.lib','.cc','.cache','.pyc','.cvsignore','.dblite','.log']      DISTTAR_EXCLUDEEXTS=['.o','.os','.so','.a','.dll','.cc','.cache','.pyc','.cvsignore','.dblite','.log']
1262      , DISTTAR_EXCLUDEDIRS=['dist']      , DISTTAR_EXCLUDEDIRS=['CVS','.svn','.sconf_temp', 'dist']
1263  )  )
1264    
1265  tar = env.DistTar("dist/ascend-"+version  tar = env.DistTar("dist/ascend-"+version

Legend:
Removed from v.560  
changed lines
  Added in v.561

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