Changeset 531 for branches

Show
Ignore:
Timestamp:
09/19/07 17:33:19 (14 months ago)
Author:
david
Message:
  • added support libxml2
  • moved comman cxx flags into a variable
  • added support for 'config.py' file
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/strict-xml-branch/SConstruct

    r527 r531  
    2828    LIBDIR_SCHEMA='lib' 
    2929 
    30 opts = Options() 
     30opts = Options('config.py') 
    3131opts.Add('PREFIX', 'The install path "prefix"', '/usr/local') 
    3232opts.Add(PathOption('BOOST_INCLUDES', 'Search path for boost include files', '/usr/include')) 
     
    3434opts.Add('BOOST_TOOLKIT','Specify boost toolkit e.g. gcc41.','',False) 
    3535opts.Add(('FREETYPE_CONFIG', 'The path to the freetype-config executable.', 'freetype-config')) 
     36opts.Add(('XML2_CONFIG', 'The path to the xml2-config executable.', '')) 
    3637opts.Add(PathOption('FRIBIDI_INCLUDES', 'Search path for fribidi include files', '/usr/include')) 
    3738opts.Add(PathOption('FRIBIDI_LIBS','Search path for fribidi include files','/usr/' + LIBDIR_SCHEMA)) 
     
    9697env.ParseConfig(env['FREETYPE_CONFIG'] + ' --libs --cflags') 
    9798 
     99if env['XML2_CONFIG']: 
     100    env.ParseConfig(env['XML2_CONFIG'] + ' --libs --cflags') 
     101    env.MergeFlags('-DHAVE_LIBXML2'); 
     102else: 
     103    env.MergeFlags('-DBOOST_PROPERTY_TREE_XML_PARSER_TINYXML -DTIXML_USE_STL'); 
     104 
    98105if env['BIDI']: 
    99106    env.Append(CXXFLAGS = '-DUSE_FRIBIDI') 
     
    225232else: pthread = '-pthread' 
    226233 
     234common_cxx_flags = '-ansi -Wall %s -ftemplate-depth-100  -D%s ' % (pthread, env['PLATFORM'].upper()); 
     235 
    227236if env['DEBUG']: 
    228     env.Append(CXXFLAGS = '-ansi -Wall %s -ftemplate-depth-100 -O0 -fno-inline -g -DDEBUG -DMAPNIK_DEBUG -D%s ' % (pthread, env['PLATFORM'].upper())) 
    229 else: 
    230     env.Append(CXXFLAGS = '-ansi -Wall %s -ftemplate-depth-100 -O2 -finline-functions -Wno-inline -DNDEBUG -D%s' % (pthread,env['PLATFORM'].upper())) 
     237    env.Append(CXXFLAGS = common_cxx_flags + '-O0 -fno-inline -g -DDEBUG -DMAPNIK_DEBUG') 
     238else: 
     239    env.Append(CXXFLAGS = common_cxx_flags + '-O2 -finline-functions -Wno-inline -DNDEBUG') 
    231240 
    232241# Install some free default fonts