optional build with libxml2

This commit is contained in:
Andreas Volz 2007-10-02 21:43:13 +00:00
parent bc11d0a5e5
commit f0cca52c3b
4 changed files with 44 additions and 3 deletions

View file

@ -90,8 +90,9 @@ AC_ARG_ENABLE(included_agg,
[ --enable-included-agg=[no/yes] enables included libagg build (default=yes)],, [ --enable-included-agg=[no/yes] enables included libagg build (default=yes)],,
enable_included_agg=yes) enable_included_agg=yes)
AM_CONDITIONAL(BUILD_AGG, test "x$enable_included_agg" = "xyes")
if [ test "x$enable_included_agg" = "xyes"]; then if [ test "x$enable_included_agg" = "xyes"]; then
AM_CONDITIONAL(BUILD_AGG, test "x$enable_included_agg" = "xyes")
AGG_LIBS=-L../agg/src AGG_LIBS=-L../agg/src
AGG_CFLAGS=-I../agg/include AGG_CFLAGS=-I../agg/include
AC_SUBST(AGG_LIBS) AC_SUBST(AGG_LIBS)
@ -103,6 +104,22 @@ else
PKG_CHECK_MODULES(AGG, libagg) PKG_CHECK_MODULES(AGG, libagg)
fi 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([ AC_OUTPUT([
Makefile Makefile
include/Makefile include/Makefile

View file

@ -1,6 +1,11 @@
libmapnikdir = $(pkgincludedir) libmapnikdir = $(pkgincludedir)
if HAVE_LIBXML2
libxml2_inc = \
libxml2_loader.hpp
endif
libmapnik_HEADERS = \ libmapnik_HEADERS = \
agg_renderer.hpp\ agg_renderer.hpp\
attribute.hpp \ attribute.hpp \
@ -10,6 +15,7 @@ libmapnik_HEADERS = \
color_factory.hpp \ color_factory.hpp \
comparison.hpp \ comparison.hpp \
config.hpp \ config.hpp \
config_error.hpp \
coord.hpp \ coord.hpp \
coord_array.hpp \ coord_array.hpp \
css_color_parser.hpp \ css_color_parser.hpp \
@ -18,6 +24,7 @@ libmapnik_HEADERS = \
datasource_cache.hpp \ datasource_cache.hpp \
distance.hpp \ distance.hpp \
ellipsoid.hpp \ ellipsoid.hpp \
enumeration.hpp \
envelope.hpp \ envelope.hpp \
expression.hpp \ expression.hpp \
factory.hpp \ factory.hpp \
@ -48,6 +55,7 @@ libmapnik_HEADERS = \
label_collision_detector.hpp \ label_collision_detector.hpp \
label_placement.hpp \ label_placement.hpp \
layer.hpp \ layer.hpp \
${libxml2_inc} \
line_pattern_symbolizer.hpp \ line_pattern_symbolizer.hpp \
line_symbolizer.hpp \ line_symbolizer.hpp \
load_map.hpp \ load_map.hpp \
@ -67,6 +75,7 @@ libmapnik_HEADERS = \
pool.hpp \ pool.hpp \
projection.hpp \ projection.hpp \
proj_transform.hpp \ proj_transform.hpp \
ptree_helpers.hpp \
quad_tree.hpp \ quad_tree.hpp \
query.hpp \ query.hpp \
raster.hpp \ raster.hpp \

View file

@ -24,6 +24,10 @@
#ifndef MAP_HPP #ifndef MAP_HPP
#define MAP_HPP #define MAP_HPP
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <mapnik/feature_type_style.hpp> #include <mapnik/feature_type_style.hpp>
#include <mapnik/datasource.hpp> #include <mapnik/datasource.hpp>
#include <mapnik/layer.hpp> #include <mapnik/layer.hpp>

View file

@ -14,6 +14,11 @@ AM_CXXFLAGS =\
lib_LTLIBRARIES = \ lib_LTLIBRARIES = \
libmapnik.la libmapnik.la
if HAVE_LIBXML2
libxml2_src = \
libxml2_loader.cpp
endif
libmapnik_la_SOURCES = \ libmapnik_la_SOURCES = \
agg_renderer.cpp\ agg_renderer.cpp\
datasource_cache.cpp \ datasource_cache.cpp \
@ -25,6 +30,7 @@ libmapnik_la_SOURCES = \
image_reader.cpp \ image_reader.cpp \
image_util.cpp \ image_util.cpp \
layer.cpp \ layer.cpp \
${libxml2_src} \
line_pattern_symbolizer.cpp \ line_pattern_symbolizer.cpp \
load_map.cpp \ load_map.cpp \
map.cpp \ map.cpp \
@ -41,9 +47,12 @@ libmapnik_la_SOURCES = \
save_map.cpp \ save_map.cpp \
scale_denominator.cpp \ scale_denominator.cpp \
shield_symbolizer.cpp \ shield_symbolizer.cpp \
stroke.cpp \
symbolizer.cpp \
text_symbolizer.cpp \ text_symbolizer.cpp \
tiff_reader.cpp \ tiff_reader.cpp \
wkb.cpp wkb.cpp
libmapnik_la_LIBADD = \ libmapnik_la_LIBADD = \
${PNG_LIBS} \ ${PNG_LIBS} \
@ -56,7 +65,8 @@ libmapnik_la_LIBADD = \
${JPEG_LIBS} \ ${JPEG_LIBS} \
${TIFF_LIBS} \ ${TIFF_LIBS} \
${PROJ_LIBS} \ ${PROJ_LIBS} \
${LTDL_LIBS} ${LTDL_LIBS} \
${LIBXML2_LIBS}
libmapnik_la_CXXFLAGS = \ libmapnik_la_CXXFLAGS = \
-I../include \ -I../include \
@ -67,7 +77,8 @@ libmapnik_la_CXXFLAGS = \
${TIFF_CFLAGS} \ ${TIFF_CFLAGS} \
${PROJ_CFLAGS} \ ${PROJ_CFLAGS} \
${LTDL_CFLAGS} \ ${LTDL_CFLAGS} \
${BOOST_CPPFLAGS} ${BOOST_CPPFLAGS} \
${LIBXML2_CFLAGS}