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.
This commit is contained in:
Jean-Francois Doyon 2006-02-06 01:08:32 +00:00
parent 1c20f2a02b
commit 9f9e4c1d8e
3 changed files with 9 additions and 11 deletions

View file

@ -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

View file

@ -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)

View file

@ -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')