/[ascend]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 463 by johnpye, Sun Apr 16 10:18:16 2006 UTC revision 464 by johnpye, Sun Apr 16 12:49:48 2006 UTC
# Line 9  version = "0.9.6rc0" Line 9  version = "0.9.6rc0"
9  # remembered in the file 'options.cache'. It's a feature ;-)  # remembered in the file 'options.cache'. It's a feature ;-)
10    
11  opts = Options(['options.cache', 'config.py'])  opts = Options(['options.cache', 'config.py'])
12  print "PLATFORM = ",platform.system()  #print "PLATFORM = ",platform.system()
13    
14  # Import the outside environment  # Import the outside environment
15  env = Environment(ENV=os.environ)  env = Environment(ENV=os.environ)
# Line 26  if platform.system()=='Windows' and env. Line 26  if platform.system()=='Windows' and env.
26      env.Append(LIBPATH=env['ENV']['LIB'])      env.Append(LIBPATH=env['ENV']['LIB'])
27      env.Append(CPPDEFINES=['_CRT_SECURE_NO_DEPRECATED','_CRT_SECURE_NO_DEPRECATE'])      env.Append(CPPDEFINES=['_CRT_SECURE_NO_DEPRECATED','_CRT_SECURE_NO_DEPRECATE'])
28    
29    if platform.system()=="Windows":
30        default_tcl_lib = "tcl83"
31        default_tk_lib = "tk83"
32        default_tktable_lib = "Tktable28"
33    else:
34        default_tcl_lib = "tcl"
35        default_tk_lib = "tk"
36        default_tktable_lib = "Tktable2.8"
37            
38    
39  # Package linking option  # Package linking option
# Line 135  opts.Add(PackageOption( Line 143  opts.Add(PackageOption(
143  opts.Add(  opts.Add(
144      'TCL_LIB'      'TCL_LIB'
145      ,"Name of Tcl lib (eg 'tcl' or 'tcl83')"      ,"Name of Tcl lib (eg 'tcl' or 'tcl83')"
146      ,'tcl'      ,default_tcl_lib
147  )  )
148    
149  # Where are the Tk includes?  # Where are the Tk includes?
150  opts.Add(PackageOption(  opts.Add(PackageOption(
151      'TK_CPPPATH'      'TK_CPPPATH'
152      ,"Where are your Tk include files?"      ,"Where are your Tk include files?"
153      ,'off'      ,'$TCL_CPPPATH'
154  ))  ))
155    
156  # Where are the Tk libs?  # Where are the Tk libs?
157  opts.Add(PackageOption(  opts.Add(PackageOption(
158      'TK_LIBPATH'      'TK_LIBPATH'
159      ,"Where are your Tk libraries?"      ,"Where are your Tk libraries?"
160      ,'off'      ,'$TCL_LIBPATH'
161  ))  ))
162    
163  # What is the name of the Tk lib?  # What is the name of the Tk lib?
164  opts.Add(  opts.Add(
165      'TK_LIB'      'TK_LIB'
166      ,"Name of Tk lib (eg 'tk' or 'tk83')"      ,"Name of Tk lib (eg 'tk' or 'tk83')"
167      ,'tk'      ,default_tk_lib
168  )    )  
169    
170  # Static linking to TkTable  # Static linking to TkTable
# Line 167  opts.Add(BoolOption( Line 175  opts.Add(BoolOption(
175      ,False      ,False
176  ))  ))
177    
178  opts.Add(PackageOption(  opts.Add(
179      'TKTABLE_LIBPATH'      'TKTABLE_LIBPATH'
180      ,'Location of TkTable static library'      ,'Location of TkTable static library'
181      ,'off'      ,'$TCL_LIBPATH/Tktable2.8'
182  ))  )
183    
184  opts.Add(  opts.Add(
185      'TKTABLE_LIB'      'TKTABLE_LIB'
186      ,'Name of TkTable static library (excluding suffix/prefix, eg libtktable2.8.so -> tktable2.8)'      ,'Name of TkTable static library (excluding suffix/prefix, eg libtktable2.8.so -> tktable2.8)'
187      ,'Tktable2.8'      ,default_tktable_lib
188  )  )
189    
190  opts.Add(  opts.Add(
# Line 247  without_python_reason = "disabled by opt Line 255  without_python_reason = "disabled by opt
255  with_cunit_tests = env['WITH_CUNIT_TESTS']  with_cunit_tests = env['WITH_CUNIT_TESTS']
256  without_cunit_reason = "not requested"  without_cunit_reason = "not requested"
257    
258  print "SOLVERS:",env['WITH_SOLVERS']  #print "SOLVERS:",env['WITH_SOLVERS']
259  print "WITH_LOCAL_HELP:",env['WITH_LOCAL_HELP']  #print "WITH_BINTOKEN:",env['WITH_BINTOKEN']
260  print "WITH_BINTOKEN:",env['WITH_BINTOKEN']  #print "DEFAULT_ASCENDLIBRARY:",env['DEFAULT_ASCENDLIBRARY']
 print "DEFAULT_ASCENDLIBRARY:",env['DEFAULT_ASCENDLIBRARY']  
261    
262  subst_dict = {  subst_dict = {
263      '@WEBHELPROOT@':'http://pye.dyndns.org/ascend/manual/'      '@WEBHELPROOT@':'http://pye.dyndns.org/ascend/manual/'
# Line 266  subst_dict = { Line 273  subst_dict = {
273  }  }
274    
275  if env['WITH_LOCAL_HELP']:  if env['WITH_LOCAL_HELP']:
276        print "WITH_LOCAL_HELP:",env['WITH_LOCAL_HELP']
277      subst_dict['@HELP_ROOT@']=env['WITH_LOCAL_HELP']      subst_dict['@HELP_ROOT@']=env['WITH_LOCAL_HELP']
278    
279  can_install = True  can_install = True
# Line 347  class KeepContext: Line 355  class KeepContext:
355          libs_add = []          libs_add = []
356          if context.env.has_key(varprefix+'_LIB'):          if context.env.has_key(varprefix+'_LIB'):
357              libs_add = [env[varprefix+'_LIB']]              libs_add = [env[varprefix+'_LIB']]
358              print "Adding '"+str(libs_add)+"' to libs"                #print "Adding '"+str(libs_add)+"' to libs"
359    
360          context.env.Append(          context.env.Append(
361              LIBPATH = libpath_add              LIBPATH = libpath_add
# Line 356  class KeepContext: Line 364  class KeepContext:
364          )          )
365    
366      def restore(self,context):      def restore(self,context):
367          print "RESTORING CONTEXT"          #print "RESTORING CONTEXT"
368          print self.keep          #print self.keep
369          print "..."          #print "..."
370          for k in self.keep:          for k in self.keep:
371              if self.keep[k]==None:              if self.keep[k]==None:
372                  print "Clearing "+str(k)                  #print "Clearing "+str(k)
373                  del context.env[k];                  del context.env[k];
374              else:              else:
375                  print "Restoring "+str(k)+" to '"+self.keep[k]+"'"                                #print "Restoring "+str(k)+" to '"+self.keep[k]+"'"            
376                  context.env[k]=self.keep[k];                  context.env[k]=self.keep[k];
377    
378  def CheckExtLib(context,libname,text,ext='.c',varprefix=None):  def CheckExtLib(context,libname,text,ext='.c',varprefix=None):
# Line 602  if need_fortran: Line 610  if need_fortran:
610      else:      else:
611          print "FORTRAN-77 required but not found"          print "FORTRAN-77 required but not found"
612          Exit(1)          Exit(1)
613  else:  #else:
614      print "FORTRAN not required"  #   print "FORTRAN not required"
615    
616  # TODO: -D_HPUX_SOURCE is needed  # TODO: -D_HPUX_SOURCE is needed
617    

Legend:
Removed from v.463  
changed lines
  Added in v.464

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