From 9f9e4c1d8e66ef0a037ed0fd60ff6348afe0e4e0 Mon Sep 17 00:00:00 2001 From: Jean-Francois Doyon Date: Mon, 6 Feb 2006 01:08:32 +0000 Subject: [PATCH] Reworked the way the tail end of the boost libs (i.e. -gcc-mt) is handled. This will eventually help with mroe platforms, and to link with debug libraries. --- SConstruct | 9 +++++++-- bindings/python/SConscript | 2 +- utils/shapeindex/SConscript | 9 +-------- 3 files changed, 9 insertions(+), 11 deletions(-) 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')