diff --git a/configure.ac b/configure.ac index 32601efa7..0e218dfef 100644 --- a/configure.ac +++ b/configure.ac @@ -90,8 +90,9 @@ AC_ARG_ENABLE(included_agg, [ --enable-included-agg=[no/yes] enables included libagg build (default=yes)],, enable_included_agg=yes) +AM_CONDITIONAL(BUILD_AGG, test "x$enable_included_agg" = "xyes") + if [ test "x$enable_included_agg" = "xyes"]; then - AM_CONDITIONAL(BUILD_AGG, test "x$enable_included_agg" = "xyes") AGG_LIBS=-L../agg/src AGG_CFLAGS=-I../agg/include AC_SUBST(AGG_LIBS) @@ -103,6 +104,22 @@ else PKG_CHECK_MODULES(AGG, libagg) fi + +dnl Check for option to enable libxml2 +AC_MSG_CHECKING(whether to enable included libxml2 building) +AC_ARG_ENABLE(libxml2, + [ --enable-libxml2=[no/yes] enables included libxml2 build (default=no)],, + enable_libxml2=no) + +AM_CONDITIONAL(HAVE_LIBXML2, test "x$enable_libxml2" = "xyes") + +if [ test "x$enable_libxml2" = "xyes"]; then + AC_MSG_RESULT(yes) + PKG_CHECK_MODULES(LIBXML2, libxml-2.0) +else + AC_MSG_RESULT(no) +fi + AC_OUTPUT([ Makefile include/Makefile diff --git a/include/mapnik/Makefile.am b/include/mapnik/Makefile.am index 70e36d0f0..8ee2b2849 100644 --- a/include/mapnik/Makefile.am +++ b/include/mapnik/Makefile.am @@ -1,6 +1,11 @@ libmapnikdir = $(pkgincludedir) +if HAVE_LIBXML2 +libxml2_inc = \ + libxml2_loader.hpp +endif + libmapnik_HEADERS = \ agg_renderer.hpp\ attribute.hpp \ @@ -10,6 +15,7 @@ libmapnik_HEADERS = \ color_factory.hpp \ comparison.hpp \ config.hpp \ + config_error.hpp \ coord.hpp \ coord_array.hpp \ css_color_parser.hpp \ @@ -18,6 +24,7 @@ libmapnik_HEADERS = \ datasource_cache.hpp \ distance.hpp \ ellipsoid.hpp \ + enumeration.hpp \ envelope.hpp \ expression.hpp \ factory.hpp \ @@ -48,6 +55,7 @@ libmapnik_HEADERS = \ label_collision_detector.hpp \ label_placement.hpp \ layer.hpp \ + ${libxml2_inc} \ line_pattern_symbolizer.hpp \ line_symbolizer.hpp \ load_map.hpp \ @@ -67,6 +75,7 @@ libmapnik_HEADERS = \ pool.hpp \ projection.hpp \ proj_transform.hpp \ + ptree_helpers.hpp \ quad_tree.hpp \ query.hpp \ raster.hpp \ diff --git a/include/mapnik/map.hpp b/include/mapnik/map.hpp index ff5a0f686..ae9f828de 100644 --- a/include/mapnik/map.hpp +++ b/include/mapnik/map.hpp @@ -24,6 +24,10 @@ #ifndef MAP_HPP #define MAP_HPP +#ifdef HAVE_CONFIG_H + #include +#endif + #include #include #include diff --git a/src/Makefile.am b/src/Makefile.am index ca4102ce9..2730daa5e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -14,6 +14,11 @@ AM_CXXFLAGS =\ lib_LTLIBRARIES = \ libmapnik.la +if HAVE_LIBXML2 +libxml2_src = \ + libxml2_loader.cpp +endif + libmapnik_la_SOURCES = \ agg_renderer.cpp\ datasource_cache.cpp \ @@ -25,6 +30,7 @@ libmapnik_la_SOURCES = \ image_reader.cpp \ image_util.cpp \ layer.cpp \ + ${libxml2_src} \ line_pattern_symbolizer.cpp \ load_map.cpp \ map.cpp \ @@ -41,9 +47,12 @@ libmapnik_la_SOURCES = \ save_map.cpp \ scale_denominator.cpp \ shield_symbolizer.cpp \ + stroke.cpp \ + symbolizer.cpp \ text_symbolizer.cpp \ tiff_reader.cpp \ wkb.cpp + libmapnik_la_LIBADD = \ ${PNG_LIBS} \ @@ -56,7 +65,8 @@ libmapnik_la_LIBADD = \ ${JPEG_LIBS} \ ${TIFF_LIBS} \ ${PROJ_LIBS} \ - ${LTDL_LIBS} + ${LTDL_LIBS} \ + ${LIBXML2_LIBS} libmapnik_la_CXXFLAGS = \ -I../include \ @@ -67,7 +77,8 @@ libmapnik_la_CXXFLAGS = \ ${TIFF_CFLAGS} \ ${PROJ_CFLAGS} \ ${LTDL_CFLAGS} \ - ${BOOST_CPPFLAGS} + ${BOOST_CPPFLAGS} \ + ${LIBXML2_CFLAGS}