From 7c18308d32f4de27cf36732cb2cde912e4143c2f Mon Sep 17 00:00:00 2001 From: Artem Pavlenko Date: Wed, 17 Jan 2007 11:59:41 +0000 Subject: [PATCH] Added BOOST_TOOLKIT option (defaults to env['CC']). Specify BOOST_TOOLKIT=gcc41 for libboost_***-gcc41-mt.so --- SConstruct | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/SConstruct b/SConstruct index d2fa42ae1..60ae24709 100644 --- a/SConstruct +++ b/SConstruct @@ -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')