/[ascend]/trunk/SConstruct
ViewVC logotype

Contents of /trunk/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log


Revision 386 - (show annotations) (download)
Thu Mar 30 04:46:48 2006 UTC (14 years, 1 month ago) by johnpye
File size: 2049 byte(s)
Added SConscript to Tcl/Tk directory.
Still having some problems with linking.
1 import os, commands, platform
2
3 #------------------------------------------------------
4 # OPTIONS
5
6 env = Environment(ENV=os.environ)
7 opts = Options(['options.cache', 'config.py'])
8 print "PLATFORM = ",platform.system()
9
10 # TODO: add install options
11
12 # TODO: OTHER OPTIONS?
13
14 # TODO: flags for optimisation
15
16 # Package linking option
17 opts.Add(EnumOption(
18 'PACKAGE_LINKING'
19 , 'Style of linking for external libraries'
20 , 'DYNAMIC_PACKAGES'
21 , ['DYNAMIC_PACKAGES', 'STATIC_PACKAGES', 'NO_PACKAGES']
22 ))
23
24 opts.Add(BoolOption(
25 'WITHOUT_TCLTK_GUI'
26 ,"Set to True if you don't want to build the original Tcl/Tk GUI."
27 , False
28 ))
29
30 opts.Update(env)
31 opts.Save('options.cache',env)
32
33 Help(opts.GenerateHelpText(env))
34
35 env.Append(CPPDEFINES=env['PACKAGE_LINKING'])
36
37 with_tcltk_gui = (env['WITHOUT_TCLTK_GUI']==False)
38
39 #------------------------------------------------------
40 # CONFIGURATION
41
42 conf = Configure(env
43 , custom_tests = {
44 # 'CheckIsNan' : CheckIsNan
45 # ,'CheckCppUnitConfig' : CheckCppUnitConfig
46 }
47 , config_h = "config.h"
48 )
49
50 # Math library
51 if not conf.CheckLibWithHeader(['m','c','libc'], 'math.h', 'C'):
52 print 'Did not find libm.a or m.lib, exiting!'
53 Exit(1)
54
55 # Where is 'isnan'?
56
57 if not conf.CheckFunc('isnan'):
58 print "Didn't find isnan"
59 Exit(1)
60
61 # Where is tcl.h ?
62 if not conf.CheckHeader('tcl.h'):
63 with_tcltk_gui = False
64
65 if not conf.CheckHeader('tk.h'):
66 with_tcltk_gui = False
67
68 if not conf.CheckLib('tcl'):
69 with_tcltk_gui = False
70
71 if not conf.CheckLib('tk'):
72 with_tcktk_gui = False
73
74 # TODO: -D_HPUX_SOURCE is needed
75
76 # TODO: check size of void*
77
78 #------------------------------------------------------
79 # SUBDIRECTORIES....
80
81 env.Append(CPPPATH=['..'])
82
83 env.SConscript(['base/generic/general/SConscript'],'env')
84
85 env.SConscript(['base/generic/utilities/SConscript'],'env')
86
87 env.SConscript(['base/generic/compiler/SConscript'],'env')
88
89 env.SConscript(['base/generic/solver/SConscript'],'env')
90
91 env.SConscript(['base/generic/packages/SConscript'],'env')
92
93 if with_tcltk_gui:
94 env.SConscript(['tcltk98/generic/interface/SConscript'],'env')
95

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