1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
--- SConstruct.orig 2009-08-30 19:23:30 UTC
+++ SConstruct
@@ -12,9 +12,11 @@ isLinuxPlatform = sys.platform=='linux2'
isDarwinPlatform = sys.platform=='darwin'
-def establish_options(env):
- opts = Options('options_cache.py')
+def establish_variables(env):
+ opts = Variables('variables_cache.py')
+ opts.Add("CCFLAGS", "Manually add to the CCFLAGS", "")
opts.Add("CXXFLAGS", "Manually add to the CXXFLAGS", "-g")
+ opts.Add("LIBPATH", "Manually add to the LIBPATH", "")
opts.Add("LINKFLAGS", "Manually add to the LINKFLAGS", "-g")
if isDarwinPlatform:
opts.Add(PathOption("INSTALLDIR", "Installation Directory", "./"))
@@ -22,14 +24,14 @@ def establish_options(env):
opts.Add("INSTALLDIR", "Installation Directory", "/usr/local/share")
opts.Add("BINDIR", "Binary Installation Directory", "/usr/local/bin")
opts.Add("DATADIR", "Directory where data will be put, set to the same as INSTALLDIR", "/usr/local/share")
- opts.Add(BoolOption("release", "Build for release", 0))
- opts.Add(BoolOption("profile", "Build with profiling on", 0))
- opts.Add(BoolOption("mingw", "Build with mingw enabled if not auto-detected", 0))
- opts.Add(BoolOption("server", "Build only the YOG server, excluding the game and any GUI/sound components", 0))
+ opts.Add(BoolVariable("release", "Build for release", 0))
+ opts.Add(BoolVariable("profile", "Build with profiling on", 0))
+ opts.Add(BoolVariable("mingw", "Build with mingw enabled if not auto-detected", 0))
+ opts.Add(BoolVariable("server", "Build only the YOG server, excluding the game and any GUI/sound components", 0))
opts.Add("font", "Build the game using an alternative font placed in the data/font folder", "sans.ttf")
Help(opts.GenerateHelpText(env))
opts.Update(env)
- opts.Save("options_cache.py", env)
+ opts.Save("variables_cache.py", env)
class Configuration:
@@ -111,14 +113,17 @@ def configure(env):
missing.append("zlib")
boost_thread = ''
+ boost_system = ''
if conf.CheckLib("boost_thread") and conf.CheckCXXHeader("boost/thread/thread.hpp"):
boost_thread="boost_thread"
+ boost_system="boost_system"
elif conf.CheckLib("boost_thread-mt") and conf.CheckCXXHeader("boost/thread/thread.hpp"):
boost_thread="boost_thread-mt"
else:
print "Could not find libboost_thread or libboost_thread-mt or boost/thread/thread.hpp"
missing.append("libboost_thread")
env.Append(LIBS=[boost_thread])
+ env.Append(LIBS=[boost_system])
boost_date_time = ''
if conf.CheckLib("boost_date_time") and conf.CheckCXXHeader("boost/date_time/posix_time/posix_time.hpp"):
@@ -186,7 +191,7 @@ def configure(env):
env.Append(LIBS=['fribidi'])
#Do checks for portaudio
- if conf.CheckLib('portaudio') and conf.CheckCXXHeader('portaudio.h'):
+ if conf.CheckLib('portaudio2') and conf.CheckCXXHeader('portaudio.h'):
if env['mingw'] or isWindowsPlatform:
print "--------"
print "NOTE: It appears you are compiling under Windows. At this stage, PortAudio crashes Globulation 2 when voice chat is used."
@@ -194,9 +199,9 @@ def configure(env):
print "--------"
else:
if GetOption('portaudio'):
- print "trying to use portaudio"
+ print "trying to use portaudio2"
configfile.add("HAVE_PORTAUDIO ", "Defined when Port Audio support is present and compiled")
- env.Append(LIBS=['portaudio'])
+ env.Append(LIBS=['portaudio2'])
else:
print " no portaudio"
print " no portaudio - although portaudio was found to be installed, you have "
@@ -236,7 +241,7 @@ def main():
Exit(1)
env["VERSION"] = "0.9.4.4"
- establish_options(env)
+ establish_variables(env)
#Add the paths to important mingw libraries
if env['mingw'] or isWindowsPlatform:
env.Append(LIBPATH=["C:/msys/1.0/local/lib", "C:/msys/1.0/lib"])
|