add SCons flag for controlling compile-time use of SHAPE_MEMORY_MAPPED_FILE

This commit is contained in:
Dane Springmeyer 2009-07-08 00:53:13 +00:00
parent e04756277b
commit 6c846d77a6
2 changed files with 8 additions and 1 deletions

View file

@ -162,6 +162,7 @@ opts.AddVariables(
PathVariable('SQLITE_LIBS', 'Search path for SQLITE library files', '/usr/' + LIBDIR_SCHEMA, PathVariable.PathAccept),
# Other variables
BoolVariable('SHAPE_MEMORY_MAPPED_FILE', 'Utilize memory-mapped files in Shapefile Plugin (higher memory usage, better performance)', 'True'),
('SYSTEM_FONTS','Provide location for python bindings to register fonts (if given aborts installation of bundled DejaVu fonts)',''),
('LIB_DIR_NAME','Name to use for the "lib" folder where fonts and plugins are installed','/mapnik/'),
PathVariable('PYTHON','Full path to Python executable used to build bindings', sys.executable),

View file

@ -45,7 +45,13 @@ if env['PLATFORM'] == 'Darwin':
libraries.append('boost_system%s' % env['BOOST_APPEND'])
libraries.append('boost_filesystem%s' % env['BOOST_APPEND'])
shape_inputdriver = env.SharedLibrary('shape', SHLIBSUFFIX='.input', source=shape_src, SHLIBPREFIX='', LIBS = libraries)
if env['SHAPE_MEMORY_MAPPED_FILE']:
cxx_flags = '-DSHAPE_MEMORY_MAPPED_FILE'
else:
cxx_flags = ''
shape_inputdriver = env.SharedLibrary('shape', SHLIBSUFFIX='.input', source=shape_src, SHLIBPREFIX='', LIBS = libraries, CXXFLAGS=cxx_flags)
env.Install(install_prefix + '/' + env['LIBDIR_SCHEMA'] + env['LIB_DIR_NAME'] + '/input', shape_inputdriver)
env.Alias('install', install_prefix + '/' + env['LIBDIR_SCHEMA'] + env['LIB_DIR_NAME'] + '/input')