comparison build/linux2-config-dist.py @ 175:ea04dfe54aae

* Buildscripts have been modified to work with different python versions. This applys only to linux/freebsd/darwin. For windows the only supported python version remains 2.5.x. On linux/freebsd/darwin 2.5 and 2.6 should work.
author nihathrael@33b003aa-7bff-0310-803a-e67f0ece8222
date Sun, 25 Jan 2009 19:07:57 +0000
parents b49714fff478
children 542213eebe73
comparison
equal deleted inserted replaced
174:362fe23920b9 175:ea04dfe54aae
1 import sys
2
1 def initEnvironment(env): 3 def initEnvironment(env):
2 return env 4 return env
3 5
4 def addExtras(context): 6 def addExtras(context):
5 context.env.Append(LIBS = 'm') 7 context.env.Append(LIBS = 'm')
6 context.env.Replace(LIBPATH = ['/opt/lib', '%s/ext/install/lib' % context.env['SCONS_ROOT_PATH']]) 8 context.env.Replace(LIBPATH = ['/opt/lib', ('%s/ext/install/lib' % context.env['SCONS_ROOT_PATH'])])
7 context.env.Append(CPPPATH = ['/opt/include', 9 context.env.Append(CPPPATH = ['/opt/include',
8 '/usr/include/vorbis', 10 '/usr/include/vorbis',
9 '/usr/include/python2.5', 11 '/usr/include/python%s'% sys.version[:3],
12 '/usr/include/SDL',
10 '%s/ext/install/include' % context.env['SCONS_ROOT_PATH']]) 13 '%s/ext/install/include' % context.env['SCONS_ROOT_PATH']])
11 context.env.Append(CPPPATH = []) 14 context.env.Append(CPPPATH = [])
12 15
13 context.checkSimpleLib(['vorbisfile'], 'vorbisfile.h') 16 context.checkSimpleLib(['vorbisfile'], 'vorbisfile.h')
14 context.checkSimpleLib(['openal_soft'], 'AL/al.h') 17 context.checkSimpleLib(['openal_soft'], 'AL/al.h')
15 context.checkSimpleLib(['python', 'python2.5'], ['python2.5/Python.h']) 18 context.checkSimpleLib(['python%s' % sys.version[:3], 'python2%s'%sys.version[2]], ['Python.h']) # Use current python version
16 context.checkSimpleLib(['SDL'], 'SDL.h') 19 context.checkSimpleLib(['SDL'], 'SDL.h')
17 context.checkSimpleLib(['SDL_ttf'], 'SDL_ttf.h') 20 context.checkSimpleLib(['SDL_ttf'], 'SDL_ttf.h')
18 context.checkSimpleLib(['SDL_image'], 'SDL_image.h') 21 context.checkSimpleLib(['SDL_image'], 'SDL_image.h')
19 context.checkSimpleLib(['guichan']) 22 context.checkSimpleLib(['guichan'])
20 context.checkSimpleLib(['guichan_sdl']) 23 context.checkSimpleLib(['guichan_sdl'])
21 context.checkSimpleLib(['boost_filesystem', 'boost_filesystem-gcc', 'boost_filesystem-gcc41']) 24 context.checkSimpleLib(['boost_filesystem', 'boost_filesystem-gcc', 'boost_filesystem-gcc41'])
22 context.checkSimpleLib(['boost_regex', 'boost_regex-gcc', 'boost_regex-gcc41']) 25 context.checkSimpleLib(['boost_regex', 'boost_regex-gcc', 'boost_regex-gcc41'])
23 context.checkSimpleLib(['png'], 'png.h'); 26 context.checkSimpleLib(['png'], 'png.h');
24 27
25 if context.env['opengl']: 28 if context.env['opengl']:
26 # linking explicitly against libstdc++ to work around Segfault_in_cxa_allocate_exception issue: http://wiki.fifengine.de/Segfault_in_cxa_allocate_exception 29 # linking explicitly against libstdc++ to work around Segfault_in_cxa_allocate_exception issue: http://wiki.fifengine.de/Segfault_in_cxa_allocate_exception
27 context.env.Append(LIBS = ['stdc++', 'GL', 'GLU']) 30 context.env.Append(LIBS = ['stdc++', 'GL', 'GLU'])
28 context.env.Append(LIBPATH = ['/usr/X11R6/lib']) 31 context.env.Append(LIBPATH = ['/usr/X11R6/lib'])
29 context.checkSimpleLib(['guichan_opengl']) 32 context.checkSimpleLib(['guichan_opengl'])