ensure shapeindex links against boost system if available (boost >=1.35) to avoid potential problems in indirect linking on linux (essentially directly dynamically linking like we previously only did on os x) - closes #517

This commit is contained in:
Dane Springmeyer 2010-02-21 01:00:09 +00:00
parent badbc8706f
commit 07186fc6bb
5 changed files with 20 additions and 17 deletions

View file

@ -251,7 +251,7 @@ pickle_store = [# Scons internal variables
'PYTHON_INSTALL_LOCATION', 'PYTHON_INSTALL_LOCATION',
'PYTHON_SYS_PREFIX', 'PYTHON_SYS_PREFIX',
'COLOR_PRINT', 'COLOR_PRINT',
'BOOST_SYSTEM_REQUIRED', 'HAS_BOOST_SYSTEM',
] ]
# Add all other user configurable options to pickle pickle_store # Add all other user configurable options to pickle pickle_store
@ -304,6 +304,13 @@ if not force_configure:
else: else:
preconfigured = False preconfigured = False
# check for missing keys in pickled settings
# which can occur when keys are added or changed between
# rebuilds, e.g. for folks following trunk
for opt in pickle_store:
if not opt in env:
preconfigured = False
# if custom arguments are supplied make sure to accept them # if custom arguments are supplied make sure to accept them
if opts.args: if opts.args:
# since we have custom arguments update environment with all opts to # since we have custom arguments update environment with all opts to
@ -731,22 +738,21 @@ if not preconfigured:
conf.FindBoost(BOOST_SEARCH_PREFIXES,thread_flag) conf.FindBoost(BOOST_SEARCH_PREFIXES,thread_flag)
# get boost version from boost headers rather than previous approach # boost system is used in boost 1.35 and greater
# of fetching from the user provided INCLUDE path has_boost_system = False
boost_system_required = False
boost_lib_version_from_header = conf.GetBoostLibVersion() boost_lib_version_from_header = conf.GetBoostLibVersion()
if boost_lib_version_from_header: if boost_lib_version_from_header:
boost_version_from_header = int(boost_lib_version_from_header.split('_')[1]) boost_version_from_header = int(boost_lib_version_from_header.split('_')[1])
if boost_version_from_header >= 35 and env['PLATFORM'] == 'Darwin': if boost_version_from_header >= 35:
boost_system_required = True has_boost_system = True
env['BOOST_SYSTEM_REQUIRED'] = True env['HAS_BOOST_SYSTEM'] = True
else: else:
boost_system_required = False has_boost_system = False
env['BOOST_SYSTEM_REQUIRED'] = False env['HAS_BOOST_SYSTEM'] = False
# The other required boost headers. # The other required boost headers.
BOOST_LIBSHEADERS = [ BOOST_LIBSHEADERS = [
['system', 'boost/system/system_error.hpp', boost_system_required], ['system', 'boost/system/system_error.hpp', has_boost_system],
['filesystem', 'boost/filesystem/operations.hpp', True], ['filesystem', 'boost/filesystem/operations.hpp', True],
['regex', 'boost/regex.hpp', True], ['regex', 'boost/regex.hpp', True],
['iostreams','boost/iostreams/device/mapped_file.hpp',True], ['iostreams','boost/iostreams/device/mapped_file.hpp',True],

View file

@ -36,7 +36,7 @@ ogr_src = Split(
libraries = [env['PLUGINS']['ogr']['lib']] libraries = [env['PLUGINS']['ogr']['lib']]
if env['PLATFORM'] == 'Darwin': if env['PLATFORM'] == 'Darwin':
if env['BOOST_SYSTEM_REQUIRED']: if env['HAS_BOOST_SYSTEM']:
boost_system = 'boost_system%s' % env['BOOST_APPEND'] boost_system = 'boost_system%s' % env['BOOST_APPEND']
libraries.append(boost_system) libraries.append(boost_system)
libraries.append('mapnik') libraries.append('mapnik')

View file

@ -49,7 +49,7 @@ if env['THREADING'] == 'multi':
libraries.append('boost_thread%s' % env['BOOST_APPEND']) libraries.append('boost_thread%s' % env['BOOST_APPEND'])
if env['PLATFORM'] == 'Darwin': if env['PLATFORM'] == 'Darwin':
if env['BOOST_SYSTEM_REQUIRED']: if env['HAS_BOOST_SYSTEM']:
libraries.append('boost_system%s' % env['BOOST_APPEND']) libraries.append('boost_system%s' % env['BOOST_APPEND'])
if env['INTERNAL_LIBAGG']: if env['INTERNAL_LIBAGG']:

View file

@ -40,7 +40,7 @@ boost_filesystem = 'boost_filesystem%s' % env['BOOST_APPEND']
libraries = [boost_program_options,boost_iostreams,boost_filesystem,env['PLUGINS']['ogr']['lib'],'mapnik'] libraries = [boost_program_options,boost_iostreams,boost_filesystem,env['PLUGINS']['ogr']['lib'],'mapnik']
if env['PLATFORM'] == 'Darwin': if env['PLATFORM'] == 'Darwin':
if env['BOOST_SYSTEM_REQUIRED']: if env['HAS_BOOST_SYSTEM']:
boost_system = 'boost_system%s' % env['BOOST_APPEND'] boost_system = 'boost_system%s' % env['BOOST_APPEND']
libraries.append(boost_system) libraries.append(boost_system)
libraries.append(env['ICU_LIB_NAME']) libraries.append(env['ICU_LIB_NAME'])

View file

@ -43,10 +43,7 @@ libraries = [boost_program_options,boost_iostreams,boost_filesystem]
boost_system = 'boost_system%s' % env['BOOST_APPEND'] boost_system = 'boost_system%s' % env['BOOST_APPEND']
if env['SUNCC']: if env['HAS_BOOST_SYSTEM']:
libraries.append(boost_system)
if env['PLATFORM'] == 'Darwin' and env['BOOST_SYSTEM_REQUIRED']:
libraries.append(boost_system) libraries.append(boost_system)