diff --git a/SConstruct b/SConstruct index 8de5cf1ea..9061a1e5c 100644 --- a/SConstruct +++ b/SConstruct @@ -138,6 +138,7 @@ opts.AddVariables( ('BOOST_TOOLKIT','Specify boost toolkit, e.g., gcc41.','',False), ('BOOST_ABI', 'Specify boost ABI, e.g., d.','',False), ('BOOST_VERSION','Specify boost version, e.g., 1_35.','',False), + ('BOOST_PYTHON_LIB','Specify library name or full path to boost_python lib (e.g. "boost_python-py26" or "/usr/lib/libboost_python.dylib")',''), # Variables for required dependencies ('FREETYPE_CONFIG', 'The path to the freetype-config executable.', 'freetype-config'), @@ -358,7 +359,7 @@ def rollback_option(context,variable): if item.key == variable: env[variable] = item.default -def FindBoost(context, prefixes): +def FindBoost(context, prefixes, thread_flag): """Routine to auto-find boost header dir, lib dir, and library naming structure. """ @@ -669,7 +670,7 @@ if not preconfigured: else: thread_flag = '' - conf.FindBoost(BOOST_SEARCH_PREFIXES) + conf.FindBoost(BOOST_SEARCH_PREFIXES,thread_flag) # get boost version from boost headers rather than previous approach # of fetching from the user provided INCLUDE path diff --git a/bindings/python/SConscript b/bindings/python/SConscript index 83b11a021..e38e57b67 100644 --- a/bindings/python/SConscript +++ b/bindings/python/SConscript @@ -30,7 +30,18 @@ install_prefix = env['DESTDIR'] + '/' + prefix linkflags = '' libraries = ['mapnik','png','jpeg'] -libraries.append('boost_python%s' % env['BOOST_APPEND']) +headers = [env['PYTHON_INCLUDES']] + env['CPPPATH'] + +if env['BOOST_PYTHON_LIB']: + if os.path.sep in env['BOOST_PYTHON_LIB']: + pylib_dir = os.path.dirname(env['BOOST_PYTHON_LIB']) + env.Prepend(LIBPATH = pylib_dir) + pylib_name = os.path.splitext(os.path.basename(env['BOOST_PYTHON_LIB']))[0].replace('lib','',1) + libraries.append(pylib_name) + else: + libraries.append(env['BOOST_PYTHON_LIB'].replace('lib','',1)) +else: + libraries.append('boost_python%s' % env['BOOST_APPEND']) if env['PLATFORM'] == 'Darwin': libraries.append(env['ICU_LIB_NAME']) @@ -82,7 +93,7 @@ if env['PLATFORM'] == 'Darwin': else: linkflags = '-lpython%s' % env['PYTHON_VERSION'] -headers = [env['PYTHON_INCLUDES']] + env['CPPPATH'] + paths = ''' """Configuration paths of Mapnik fonts and input plugins (autogenerated by SCons).""" diff --git a/include/mapnik/feature_style_processor.hpp b/include/mapnik/feature_style_processor.hpp index d6d862764..c85ffd028 100644 --- a/include/mapnik/feature_style_processor.hpp +++ b/include/mapnik/feature_style_processor.hpp @@ -34,9 +34,13 @@ #include #include #include + +/* #ifdef MAPNIK_DEBUG #include #endif +*/ + //stl #include @@ -70,9 +74,11 @@ namespace mapnik void apply() { +/* #ifdef MAPNIK_DEBUG mapnik::wall_clock_progress_timer t(std::clog, "map rendering took: "); #endif +*/ Processor & p = static_cast(*this); p.start_map_processing(m_); @@ -106,9 +112,11 @@ namespace mapnik void apply_to_layer(Layer const& lay, Processor & p, projection const& proj0,double scale_denom) { +/* #ifdef MAPNIK_DEBUG - wall_clock_progress_timer timer(clog, "end layer rendering: "); + wall_clock_progress_timer timer(clog, "end layer rendering: "); #endif +*/ p.start_layer_processing(lay); boost::shared_ptr ds=lay.datasource(); if (ds) diff --git a/include/mapnik/wall_clock_timer.hpp b/include/mapnik/wall_clock_timer.hpp index 8ba9ec5f0..bd471b988 100644 --- a/include/mapnik/wall_clock_timer.hpp +++ b/include/mapnik/wall_clock_timer.hpp @@ -20,9 +20,11 @@ * *****************************************************************************/ + #ifndef MAPNIK_WALL_CLOCK_TIMER_INCLUDED #define MAPNIK_WALL_CLOCK_TIMER_INCLUDED +/* #include namespace mapnik { @@ -88,4 +90,6 @@ namespace mapnik { }; }; + +*/ #endif // MAPNIK_WALL_CLOCK_TIMER_INCLUDED diff --git a/plugins/input/postgis/postgis.cpp b/plugins/input/postgis/postgis.cpp index 2218672ac..f929fc9d4 100644 --- a/plugins/input/postgis/postgis.cpp +++ b/plugins/input/postgis/postgis.cpp @@ -26,9 +26,11 @@ #include #include +/* #ifdef MAPNIK_DEBUG #include #endif +*/ #include "connection_manager.hpp" #include "postgis.hpp" @@ -450,9 +452,12 @@ boost::shared_ptr postgis_datasource::get_resultset(boost::shared_pt featureset_ptr postgis_datasource::features(const query& q) const { + +/* #ifdef MAPNIK_DEBUG mapnik::wall_clock_progress_timer timer(clog, "end feature query: "); #endif +*/ Envelope const& box = q.get_bbox(); double scale_denom = q.scale_denominator();