/[ascend]/trunk/SConstruct
ViewVC logotype

Contents of /trunk/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log


Revision 387 - (show annotations) (download)
Thu Mar 30 05:13:59 2006 UTC (13 years, 9 months ago) by johnpye
File size: 2431 byte(s)
Added SConscript for PyGTK interface.
It's not finding the lib files, something wrong with the -L options?
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.Add(BoolOption(
31 'WITHOUT_PYTHON'
32 ,"Set to True if you don't want to build Python wrappers."
33 , False
34 ))
35
36 opts.Update(env)
37 opts.Save('options.cache',env)
38
39 Help(opts.GenerateHelpText(env))
40
41 env.Append(CPPDEFINES=env['PACKAGE_LINKING'])
42
43 with_tcltk_gui = (env['WITHOUT_TCLTK_GUI']==False)
44
45 with_python = (env['WITHOUT_PYTHON']==False)
46
47 #------------------------------------------------------
48 # CONFIGURATION
49
50 conf = Configure(env
51 , custom_tests = {
52 # 'CheckIsNan' : CheckIsNan
53 # ,'CheckCppUnitConfig' : CheckCppUnitConfig
54 }
55 , config_h = "config.h"
56 )
57
58 # Math library
59 if not conf.CheckLibWithHeader(['m','c','libc'], 'math.h', 'C'):
60 print 'Did not find libm.a or m.lib, exiting!'
61 Exit(1)
62
63 # Where is 'isnan'?
64
65 if not conf.CheckFunc('isnan'):
66 print "Didn't find isnan"
67 Exit(1)
68
69 # Tcl/Tk
70 if not conf.CheckHeader('tcl.h'):
71 with_tcltk_gui = False
72
73 if not conf.CheckHeader('tk.h'):
74 with_tcltk_gui = False
75
76 if not conf.CheckLib('tcl'):
77 with_tcltk_gui = False
78
79 if not conf.CheckLib('tk'):
80 with_tcktk_gui = False
81
82 # Python
83 if not conf.CheckHeader('python2.4/Python.h'):
84 print "Didn't find Python 2.4"
85 with_python = False
86 else:
87 env.Append(CPPPATH=['/usr/include/python2.4'])
88
89 # TODO: -D_HPUX_SOURCE is needed
90
91 # TODO: check size of void*
92
93 #------------------------------------------------------
94 # SUBDIRECTORIES....
95
96 env.Append(CPPPATH=['..'])
97
98 env.SConscript(['base/generic/general/SConscript'],'env')
99
100 env.SConscript(['base/generic/utilities/SConscript'],'env')
101
102 env.SConscript(['base/generic/compiler/SConscript'],'env')
103
104 env.SConscript(['base/generic/solver/SConscript'],'env')
105
106 env.SConscript(['base/generic/packages/SConscript'],'env')
107
108 if with_tcltk_gui:
109 env.SConscript(['tcltk98/generic/interface/SConscript'],'env')
110
111 if with_python:
112 env.SConscript(['pygtk/interface/SConscript'],'env')

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