Added BOOST_TOOLKIT option (defaults to env['CC']).

Specify BOOST_TOOLKIT=gcc41 for libboost_***-gcc41-mt.so
This commit is contained in:
Artem Pavlenko 2007-01-17 11:59:41 +00:00
parent ed5bbe25fe
commit 7c18308d32

View file

@ -31,6 +31,8 @@ opts = Options()
opts.Add('PREFIX', 'The install path "prefix"', '/usr/local')
opts.Add(PathOption('BOOST_INCLUDES', 'Search path for boost include files', '/usr/include'))
opts.Add(PathOption('BOOST_LIBS', 'Search path for boost library files', '/usr/' + LIBDIR_SCHEMA))
opts.Add('BOOST_TOOLKIT','Specify boost toolkit e.g. gcc41.','',False)
opts.Add(PathOption('FREETYPE_CONFIG', 'The path to the freetype-config executable.', '/usr/bin/freetype-config'))
opts.Add(PathOption('FRIBIDI_INCLUDES', 'Search path for fribidi include files', '/usr/include'))
opts.Add(PathOption('FRIBIDI_LIBS','Search path for fribidi include files','/usr/' + LIBDIR_SCHEMA))
@ -105,7 +107,8 @@ if env['BIDI'] : C_LIBSHEADERS.append(['fribidi','fribidi/fribidi.h',True])
BOOST_LIBSHEADERS = [
['thread', 'boost/thread/mutex.hpp', True],
['filesystem', 'boost/filesystem/operations.hpp', True],
['system', 'boost/system/system_error.hpp', True],
['filesystem', 'boost/filesystem.hpp', True],
['regex', 'boost/regex.hpp', True],
['program_options', 'boost/program_options.hpp', False]
]
@ -117,13 +120,16 @@ for libinfo in C_LIBSHEADERS:
env['BOOST_APPEND'] = ''
if len(env['BOOST_TOOLKIT']): toolkit = env['BOOST_TOOLKIT']
else: toolkit = env['CC']
for count, libinfo in enumerate(BOOST_LIBSHEADERS):
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] and count == 0:
if not conf.CheckLibWithHeader('boost_%s-%s-mt' % (libinfo[0], toolkit), libinfo[1], 'C++') and libinfo[2] and count == 0:
print 'Could not find header or shared library for boost %s, exiting!' % libinfo[0]
Exit(1)
else:
env['BOOST_APPEND'] = '-%s-mt' % env['CC']
env['BOOST_APPEND'] = '-%s-mt' % toolkit
Export('env')