root/tags/release-0.2.4a/SConstruct

Revision 110, 3.4 kB (checked in by pavlenko, 3 years ago)

1. fixed shape datasource bug - attributes were ignored for point/pointz/pointm types
2. use boost::thread for mutex/lock
3 use boost::noncopyable
4 build agg as a shared lib for now
5. corrected panning code in map.cpp
6. improved coord_transform

Line 
1#  This file is part of Mapnik (c++ mapping toolkit)
2#  Copyright (C) 2005 Artem Pavlenko
3#
4#  Mapnik is free software; you can redistribute it and/or
5#  modify it under the terms of the GNU General Public License
6#  as published by the Free Software Foundation; either version 2
7#  of the License, or any later version.
8#
9#  This program is distributed in the hope that it will be useful,
10#  but WITHOUT ANY WARRANTY; without even the implied warranty of
11#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12#  GNU General Public License for more details.
13#
14#  You should have received a copy of the GNU General Public License
15#  along with this program; if not, write to the Free Software
16#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
17#
18# $Id$
19
20import os
21
22#edit 'settings.py' to match your system settings
23opts = Options('settings.py')
24
25opts.Add('PREFIX', 'Set the install "prefix"', '/opt/mapnik')
26opts.Add(PathOption('BOOST_ROOT','boost source root directory','/opt/boost'))
27opts.Add(PathOption('AGG_ROOT','agg source root directory','/opt/agg23'))
28opts.Add(PathOption('FREETYPE2_ROOT','freetype2 root directory','/opt/freetype2'))
29opts.Add(PathOption('PYTHON_ROOT','python root directory','/opt/python'))
30opts.Add('PYTHON_VERSION','python version','2.4')
31opts.Add(ListOption('DATASOURCES','list of available datasources','all',['postgis','shape','raster']))
32opts.Add(ListOption('EXTENSIONS','list of available extensions','none',['python']))
33opts.Add('POSTGRESQL_ROOT','path to postgresql prefix','/usr/local')
34   
35platform = ARGUMENTS.get("OS",Platform())
36
37build_dir = 'build'
38build_prefix = build_dir+'/'+str(platform)
39
40#cxx = 'g++'
41
42env = Environment(ENV=os.environ, options=opts)
43
44cxx_debug='-Wall -Wno-non-virtual-dtor -Wno-ctor-dtor-privacy -ftemplate-depth-100 -O0 -fno-inline -g -pthread -DDEBUG'
45cxx_release='-Wall -Wno-non-virtual-dtor -Wno-ctor-dtor-privacy -ftemplate-depth-100 -O3 -finline-functions -Wno-inline -pthread -DNDEBUG '
46
47#release_env = env.Copy(CXXFLAGS = cxx_release)
48#debug_env = env.Copy(CXXFLAGS = cxx_debug)
49
50if ARGUMENTS.get('debug',0):
51    env.Append(CXXFLAGS = cxx_debug)
52    build_prefix+='/debug'
53else:
54    env.Append(CXXFLAGS = cxx_release)
55    build_prefix+='/release'
56
57Help(opts.GenerateHelpText(env))
58
59conf = Configure(env)
60
61if not conf.CheckLibWithHeader('ltdl','ltdl.h','C'):
62    print 'Could not find libltdl/headers , exiting!'
63    Exit(1)
64
65if not conf.CheckLib('z'):
66    print 'Could not find libz , exiting!'
67    Exit(1)
68
69if not conf.CheckLibWithHeader('png','png.h','C'):
70    print 'Could not find png lib and/or headers, exiting!'
71    Exit(1)
72
73if not conf.CheckLib('jpeg'):
74    print 'Could not find jpeg lib, exiting!'
75    Exit(1)
76   
77if not conf.CheckLibWithHeader('tiff','tiff.h','C'):
78    print 'Could not find tiff lib and/or headers, exiting!'
79    Exit(1)
80   
81env  = conf.Finish()
82
83Export('env')
84#build agg lib
85env.SConscript('agg/SConscript')
86#build boost libs (filesystem, regex, python etc)
87env.SConscript('boost/SConscript')
88#main lib
89SConscript('src/SConscript')
90
91import string
92
93#python bindings
94
95if 'python' in [string.strip(m) for m in Split(env['EXTENSIONS'])]:
96    SConscript('python/SConscript')
97
98#shapeindex
99SConscript('util/shapeindex/SConscript')
100
101#datasources
102def build_datasource(name):
103    env.BuildDir('build/datasources/' + name,'src/datasources/'+name,duplicate=0)
104    SConscript('datasources/' + name + '/SConscript')
105   
106[build_datasource(name) for name in Split(env['DATASOURCES'])]
107
108
109
Note: See TracBrowser for help on using the browser.