diff --git a/SConstruct b/SConstruct index eb25b209e..a9261052f 100644 --- a/SConstruct +++ b/SConstruct @@ -83,11 +83,15 @@ for libinfo in C_LIBSHEADERS: print 'Could not find header or shared library for %s, exiting!' % libinfo[0] Exit(1) +env['BOOST_APPEND'] = '' + for libinfo in BOOST_LIBSHEADERS: - if not conf.CheckLibWithHeader('boost_%s' % libinfo[0], libinfo[1], 'C++'): + if not conf.CheckLibWithHeader('boost_%s%s' % (libinfo[0], env['BOOST_APPEND']), libinfo[1], 'C++'): if not conf.CheckLibWithHeader('boost_%s-%s-mt' % (libinfo[0], env['CC']), libinfo[1], 'C++') and libinfo[2]: print 'Could not find header or shared library for boost %s, exiting!' % libinfo[0] Exit(1) + else: + env['BOOST_APPEND'] = '-%s-mt' % env['CC'] Export('env') @@ -136,8 +140,9 @@ SConscript('agg/SConscript') # Build shapeindex and remove its dependency from the LIBS -if 'boost_program_options' in env['LIBS'] or 'boost_program_options-gcc-mt' in env['LIBS']: +if 'boost_program_options%s' % env['BOOST_APPEND'] in env['LIBS']: SConscript('utils/shapeindex/SConscript') + env['LIBS'].remove('boost_program_options%s' % env['BOOST_APPEND']) # Build the input plug-ins diff --git a/bindings/python/SConscript b/bindings/python/SConscript index 49ce4570b..d3625ff41 100644 --- a/bindings/python/SConscript +++ b/bindings/python/SConscript @@ -23,7 +23,7 @@ Import('env') prefix = env['PYTHON_PREFIX'] + '/lib/python' + env['PYTHON_VERSION'] + '/site-packages/' -libraries = ['mapnik', 'boost_python-gcc-mt'] +libraries = ['mapnik', 'boost_python%s' % env['BOOST_APPEND']] headers = [env['PYTHON_PREFIX'] + '/include/python' + env['PYTHON_VERSION']] + env['CPPPATH'] _mapnik = env.SharedLibrary('_mapnik', glob.glob('*.cpp'), LIBS=libraries, SHLIBPREFIX='', CPPPATH=headers) diff --git a/utils/shapeindex/SConscript b/utils/shapeindex/SConscript index 5551645f2..09f3567a3 100644 --- a/utils/shapeindex/SConscript +++ b/utils/shapeindex/SConscript @@ -33,14 +33,7 @@ source = Split( headers = ['#plugins/input/shape'] + env['CPPPATH'] -if 'boost_program_options-gcc-mt' in env['LIBS']: - libraries = 'boost_program_options-gcc-mt' - env['LIBS'].remove('boost_program_options-gcc-mt') -else: - libraries = 'boost_program_options' - env['LIBS'].remove('boost_program_options') - -shapeindex = env.Program('shapeindex', source, CPPPATH=headers, LIBS=libraries) +shapeindex = env.Program('shapeindex', source, CPPPATH=headers, LIBS='boost_program_options%s' % env['BOOST_APPEND']) env.Install(prefix + '/bin', shapeindex) env.Alias('install', prefix + '/bin')