always link to boost system - closes #931

This commit is contained in:
Dane Springmeyer 2011-10-25 19:29:51 -07:00
parent db87b41555
commit d8f19fab05
4 changed files with 8 additions and 21 deletions

View file

@ -425,7 +425,6 @@ pickle_store = [# Scons internal variables
'PYTHON_INSTALL_LOCATION',
'PYTHON_SYS_PREFIX',
'COLOR_PRINT',
'HAS_BOOST_SYSTEM',
'SVN_REVISION',
'HAS_CAIRO',
'HAS_PYCAIRO',
@ -1126,18 +1125,14 @@ if not preconfigured:
conf.FindBoost(BOOST_SEARCH_PREFIXES,thread_flag)
# boost system is used in boost 1.35 and greater
env['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:
env['HAS_BOOST_SYSTEM'] = True
# The other required boost headers.
BOOST_LIBSHEADERS = [
['system', 'boost/system/system_error.hpp', env['HAS_BOOST_SYSTEM']],
['system', 'boost/system/system_error.hpp', True],
['filesystem', 'boost/filesystem/operations.hpp', True],
['regex', 'boost/regex.hpp', True],
['program_options', 'boost/program_options.hpp', False]

View file

@ -53,9 +53,11 @@ ABI_VERSION = env['ABI_VERSION']
filesystem = 'boost_filesystem%s' % env['BOOST_APPEND']
regex = 'boost_regex%s' % env['BOOST_APPEND']
system = 'boost_system%s' % env['BOOST_APPEND']
# clear out and re-set libs for this env
lib_env['LIBS'] = ['freetype','ltdl','png','tiff','z','jpeg','proj',env['ICU_LIB_NAME'],filesystem,regex]
lib_env['LIBS'] = ['freetype','ltdl','png','tiff','z','jpeg','proj',env['ICU_LIB_NAME'],filesystem,system,regex]
if len(env['EXTRA_FREETYPE_LIBS']):
lib_env['LIBS'].extend(copy(env['EXTRA_FREETYPE_LIBS']))
@ -67,8 +69,6 @@ lib_env['LIBS'].append('xml2')
if env['THREADING'] == 'multi':
lib_env['LIBS'].append('boost_thread%s' % env['BOOST_APPEND'])
if env['HAS_BOOST_SYSTEM']:
lib_env['LIBS'].append('boost_system%s' % env['BOOST_APPEND'])
if not env['RUNTIME_LINK'] == 'static':

View file

@ -10,13 +10,9 @@ system = 'boost_system%s' % env['BOOST_APPEND']
regex = 'boost_regex%s' % env['BOOST_APPEND']
libraries = [filesystem, 'mapnik2']
if env['PLATFORM'] == 'Darwin':
libraries.append(env['ICU_LIB_NAME'])
libraries.append(regex)
if env['HAS_BOOST_SYSTEM']:
libraries.append(system)
libraries.append(env['ICU_LIB_NAME'])
libraries.append(regex)
libraries.append(system)
for cpp_test in glob.glob('path_element_test.cpp'):
env.Program(cpp_test.replace('.cpp',''), [cpp_test], CPPPATH=headers, LIBS=libraries)

View file

@ -38,12 +38,8 @@ headers = ['#plugins/input/shape'] + env['CPPPATH']
boost_program_options = 'boost_program_options%s' % env['BOOST_APPEND']
boost_filesystem = 'boost_filesystem%s' % env['BOOST_APPEND']
libraries = [boost_program_options, boost_filesystem]
boost_system = 'boost_system%s' % env['BOOST_APPEND']
if env['HAS_BOOST_SYSTEM']:
libraries.append(boost_system)
libraries = [boost_program_options, boost_filesystem, boost_system]
shapeindex = program_env.Program('shapeindex', source, CPPPATH=headers, LIBS=libraries, LINKFLAGS=env['CUSTOM_LDFLAGS'])