From a5284bada6e037ad17c2adbd739a0e4b711ba341 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Fri, 4 Mar 2011 22:05:29 +0000 Subject: [PATCH] add missing DEFINES to mapnik-config cflags that C++ programs need that compile against mapnik headers including expressions --- utils/mapnik-config/SConscript | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/utils/mapnik-config/SConscript b/utils/mapnik-config/SConscript index 3afdf0eb0..e1635770a 100644 --- a/utils/mapnik-config/SConscript +++ b/utils/mapnik-config/SConscript @@ -38,22 +38,38 @@ svn_revision = env['SVN_REVISION'] filesystem = 'boost_filesystem%s' % env['BOOST_APPEND'] regex = 'boost_regex%s' % env['BOOST_APPEND'] +# todo - refine this list +other_includes = env['CUSTOM_CXXFLAGS'] + env['CXXFLAGS'] + ''.join([' -I%s' % i for i in env['CPPPATH'] if not i.startswith('#')]) + private_libs = ' -lfreetype -l%s -l%s -l%s' % (env['ICU_LIB_NAME'],filesystem,regex) +if env['HAS_CAIRO']: + private_libs += ' -lcairomm-1.0 -lcairo' + other_includes.append('-DHAVE_CAIRO') + +if env['XMLPARSER'] == 'libxml2': + private_libs += ' -lxml2' + if env['THREADING'] == 'multi': private_libs += ' -lboost_thread%s' % env['BOOST_APPEND'] if env['HAS_BOOST_SYSTEM']: private_libs += ' -lboost_system%s' % env['BOOST_APPEND'] -if env['HAS_CAIRO']: - private_libs += ' -lcairomm-1.0 -lcairo' +if not env['INTERNAL_LIBAGG']: + for lib in env['LIBS']: + if lib.startswith('agg'): + private_libs += ' -l%s' % lib + +if env['SVG_RENDERER']: + other_includes.append('-DSVG_RENDERER') + +if env['LIBTOOL_SUPPORTS_ADVISE']: + other_includes.append('-DLIBTOOL_SUPPORTS_ADVISE') other_libs = env['CUSTOM_LDFLAGS'] + ''.join([' -L%s' % i for i in env['LIBPATH'] if not i.startswith('#')]) other_libs += private_libs -# todo - refine this list -other_includes = env['CUSTOM_CXXFLAGS'] + ''.join([' -I%s' % i for i in env['CPPPATH'] if not i.startswith('#')]) top = '''#!/bin/sh