Changeset 724

Show
Ignore:
Timestamp:
07/29/08 14:35:27 (4 months ago)
Author:
tom
Message:

Add an INTERNAL_LIBAGG build option that can be used to make mapnik
build against the system libagg instead of mapnik's copy.

Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/SConstruct

    r721 r724  
    6363opts.Add(EnumOption('THREADING','Set threading support','multi', ['multi','single'])) 
    6464opts.Add(EnumOption('XMLPARSER','Set xml parser ','tinyxml', ['tinyxml','spirit','libxml2'])) 
     65opts.Add(BoolOption('INTERNAL_LIBAGG', 'Use provided libagg', 'True')) 
    6566 
    6667env = Environment(ENV=os.environ, options=opts) 
     
    9394 
    9495# Libraries and headers dependency checks 
    95 env['CPPPATH'] = ['#agg/include', '#tinyxml', '#include', '#'] 
    96 env['LIBPATH'] = ['#agg', '#src'] 
     96env['CPPPATH'] = ['#tinyxml', '#include', '#'] 
     97env['LIBPATH'] = ['#src'] 
    9798 
    9899# Solaris & Sun Studio settings (the `SUNCC` flag will only be 
     
    116117    if env['THREADING'] == 'multi': 
    117118        env['CXXFLAGS'] = ['-mt'] 
     119 
     120# Decide which libagg to use 
     121if env['INTERNAL_LIBAGG']: 
     122    env.Prepend(CPPPATH = '#agg/include'); 
     123    env.Prepend(LIBPATH = '#agg'); 
     124else: 
     125    env.ParseConfig('pkg-config --libs --cflags libagg') 
    118126 
    119127# Adding the prerequisite library directories to the include path for 
     
    198206 
    199207# Build agg first, doesn't need anything special 
    200 SConscript('agg/SConscript') 
     208if env['INTERNAL_LIBAGG']: 
     209    SConscript('agg/SConscript') 
    201210 
    202211# Build the core library 
  • trunk/src/SConscript

    r704 r724  
    3131install_prefix = env['DESTDIR'] + '/' + prefix 
    3232 
    33 libraries = ['agg'] + env['LIBS'] 
     33libraries = env['LIBS'] 
     34 
     35if env['INTERNAL_LIBAGG']: 
     36    libraries.insert(0, 'agg') 
    3437 
    3538if env['PLATFORM'] == 'Darwin':