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:
parent
badbc8706f
commit
07186fc6bb
5 changed files with 20 additions and 17 deletions
26
SConstruct
26
SConstruct
|
@ -251,7 +251,7 @@ pickle_store = [# Scons internal variables
|
|||
'PYTHON_INSTALL_LOCATION',
|
||||
'PYTHON_SYS_PREFIX',
|
||||
'COLOR_PRINT',
|
||||
'BOOST_SYSTEM_REQUIRED',
|
||||
'HAS_BOOST_SYSTEM',
|
||||
]
|
||||
|
||||
# Add all other user configurable options to pickle pickle_store
|
||||
|
@ -304,6 +304,13 @@ if not force_configure:
|
|||
else:
|
||||
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 opts.args:
|
||||
# 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)
|
||||
|
||||
# get boost version from boost headers rather than previous approach
|
||||
# of fetching from the user provided INCLUDE path
|
||||
boost_system_required = False
|
||||
# boost system is used in boost 1.35 and greater
|
||||
has_boost_system = False
|
||||
boost_lib_version_from_header = conf.GetBoostLibVersion()
|
||||
if boost_lib_version_from_header:
|
||||
boost_version_from_header = int(boost_lib_version_from_header.split('_')[1])
|
||||
if boost_version_from_header >= 35 and env['PLATFORM'] == 'Darwin':
|
||||
boost_system_required = True
|
||||
env['BOOST_SYSTEM_REQUIRED'] = True
|
||||
if boost_version_from_header >= 35:
|
||||
has_boost_system = True
|
||||
env['HAS_BOOST_SYSTEM'] = True
|
||||
else:
|
||||
boost_system_required = False
|
||||
env['BOOST_SYSTEM_REQUIRED'] = False
|
||||
has_boost_system = False
|
||||
env['HAS_BOOST_SYSTEM'] = False
|
||||
|
||||
# The other required boost headers.
|
||||
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],
|
||||
['regex', 'boost/regex.hpp', True],
|
||||
['iostreams','boost/iostreams/device/mapped_file.hpp',True],
|
||||
|
|
|
@ -36,7 +36,7 @@ ogr_src = Split(
|
|||
libraries = [env['PLUGINS']['ogr']['lib']]
|
||||
|
||||
if env['PLATFORM'] == 'Darwin':
|
||||
if env['BOOST_SYSTEM_REQUIRED']:
|
||||
if env['HAS_BOOST_SYSTEM']:
|
||||
boost_system = 'boost_system%s' % env['BOOST_APPEND']
|
||||
libraries.append(boost_system)
|
||||
libraries.append('mapnik')
|
||||
|
|
|
@ -49,7 +49,7 @@ if env['THREADING'] == 'multi':
|
|||
libraries.append('boost_thread%s' % env['BOOST_APPEND'])
|
||||
|
||||
if env['PLATFORM'] == 'Darwin':
|
||||
if env['BOOST_SYSTEM_REQUIRED']:
|
||||
if env['HAS_BOOST_SYSTEM']:
|
||||
libraries.append('boost_system%s' % env['BOOST_APPEND'])
|
||||
|
||||
if env['INTERNAL_LIBAGG']:
|
||||
|
|
|
@ -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']
|
||||
|
||||
if env['PLATFORM'] == 'Darwin':
|
||||
if env['BOOST_SYSTEM_REQUIRED']:
|
||||
if env['HAS_BOOST_SYSTEM']:
|
||||
boost_system = 'boost_system%s' % env['BOOST_APPEND']
|
||||
libraries.append(boost_system)
|
||||
libraries.append(env['ICU_LIB_NAME'])
|
||||
|
|
|
@ -43,10 +43,7 @@ libraries = [boost_program_options,boost_iostreams,boost_filesystem]
|
|||
|
||||
boost_system = 'boost_system%s' % env['BOOST_APPEND']
|
||||
|
||||
if env['SUNCC']:
|
||||
libraries.append(boost_system)
|
||||
|
||||
if env['PLATFORM'] == 'Darwin' and env['BOOST_SYSTEM_REQUIRED']:
|
||||
if env['HAS_BOOST_SYSTEM']:
|
||||
libraries.append(boost_system)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue