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
|
--- SConstruct.orig Mon Dec 18 19:56:15 2006
+++ SConstruct Sun Feb 4 15:22:47 2007
@@ -57,13 +57,19 @@
# PLATFORM posix or pure cygwin
else:
+ # Section used for FreeBSD port
+ LOCALBASE = os.environ['LOCALBASE']
+ X11BASE = os.environ['X11BASE']
# determine compiler and linker flags for SDL
- env.ParseConfig('sdl-config --cflags')
- env.ParseConfig('sdl-config --libs')
+ SDL_CONFIG = os.environ['SDL_CONFIG']
+ env.ParseConfig(SDL_CONFIG + ' --cflags')
+ env.ParseConfig(SDL_CONFIG + ' --libs')
# add additional compiler flags
- if not int(env['debug']):
- env.Append(CXXFLAGS = ['-O2'])
-
+ env.Replace(CC = os.environ['CC'])
+ env.Replace(CXX = os.environ['CXX'])
+ env.Replace(CPPPATH = [X11BASE + '/include',LOCALBASE+ '/include'])
+ env.Replace(LIBPATH = [X11BASE + '/lib',LOCALBASE+ '/lib'])
+ env.Append(CXXFLAGS = os.environ['CXXFLAGS'] + ' `' + SDL_CONFIG + ' --cflags`')
# generate help for options
Help(opts.GenerateHelpText(env))
@@ -92,16 +98,16 @@
if not env.GetOption('clean'):
print ":: Checking for libs"
conf = Configure(env)
- if not conf.CheckLibWithHeader('SDL', 'SDL.h', 'c', 'SDL_Init(SDL_INIT_VIDEO);', autoadd = 0):
+ if not conf.CheckLibWithHeader('SDL', 'SDL/SDL.h', 'c', 'SDL_Init(SDL_INIT_VIDEO);', autoadd = 0):
print 'Did not find libSDL, exiting!'
Exit(1)
if not conf.CheckLibWithHeader('png', 'png.h', 'c', 'png_error(NULL, "test");'):
print 'Did not find libpng, exiting!'
Exit(1)
- if not conf.CheckLibWithHeader('SDL_image', 'SDL_image.h', 'c', 'IMG_GetError();'):
+ if not conf.CheckLibWithHeader('SDL_image', 'SDL/SDL_image.h', 'c', 'IMG_GetError();'):
print 'Did not find libSDL_image, exiting!'
Exit(1)
- if not conf.CheckLibWithHeader('SDL_ttf', 'SDL_ttf.h', 'c', 'TTF_Init();'):
+ if not conf.CheckLibWithHeader('SDL_ttf', 'SDL/SDL_ttf.h', 'c', 'TTF_Init();'):
print 'Did not find libSDL_ttf, exiting!'
Exit(1)
if int(env['with_opengl']):
|