root/trunk/configure.ac

Revision 728, 4.7 kB (checked in by andreas, 4 months ago)

- add new files
- optional check for gdal

Line 
1dnl Process this file with autoconf to produce a configure script.
2dnl Created by Anjuta application wizard.
3
4AC_INIT(mapnik, 0.5.1)
5
6AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
7AM_CONFIG_HEADER(config.h)
8AM_MAINTAINER_MODE
9
10dnl Disable libtool 1.5 support for languages we don't use
11define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
12define([AC_LIBTOOL_LANG_GCJ_CONFIG], [:])dnl
13
14AC_ISC_POSIX
15AC_PROG_CXX
16AM_PROG_CC_STDC
17AC_HEADER_STDC
18
19AM_PROG_LIBTOOL
20
21dnl Check for option to enable debug
22AC_MSG_CHECKING(whether to enable debugging)
23AC_ARG_ENABLE(debug,
24        [  --enable-debug=[no/yes]        enables debug build (default=no)],,
25                 enable_debug=no)
26
27dnl Checks for libraries
28if [ ! test "x$enable_debug" != "xyes"]; then
29  AC_DEFINE(DEBUG, 1, [Define to enable debug build])
30  CXXFLAGS="${CXXFLAGS} -g -DDEBUG -DMAPNIK_DEBUG"
31  AC_MSG_RESULT(yes)
32else
33  AC_MSG_RESULT(no)
34fi
35
36
37dnl Check for boost
38AX_BOOST_BASE
39if test "$succeeded" != "yes" ; then
40  echo "Error: You need to install the boost library!"
41  exit
42fi
43
44AX_BOOST_THREAD
45if test "x$ax_cv_boost_thread" = "xno"; then
46  echo
47  echo "Error: You need to install the boost thread library!"
48  echo
49  exit
50fi
51
52AX_BOOST_FILESYSTEM
53if test "x$ax_cv_boost_filesystem" = "xno"; then
54  echo
55  echo "Error: You need to install the boost filesystem library!"
56  echo
57  exit
58fi
59
60AX_BOOST_REGEX
61if test "x$ax_cv_boost_regex" = "xno"; then
62  echo
63  echo "Error: You need to install the boost regex library!"
64  echo
65  exit
66fi
67
68AX_BOOST_SERIALIZATION
69if test "x$ax_cv_boost_serialization" = "xno"; then
70  echo
71  echo "Error: You need to install the boost serialization library!"
72  echo
73  exit
74fi
75
76AX_BOOST_IOSTREAMS
77if test "x$ax_cv_boost_iostreams" = "xno"; then
78  echo
79  echo "Error: You need to install the boost iostreams library!"
80  echo
81  exit
82fi
83
84
85AX_LIB_POSTGRESQL
86if test "x$found_postgresql" = "xyes"; then
87  echo "checking whether to enable postgresql... yes"
88else
89  echo "checking whether to enable postgresql... no"
90fi
91AM_CONDITIONAL(HAVE_POSTGRESQL, test "x$found_postgresql" = "xyes")
92
93AC_ARG_WITH(gdal-config,
94[  --with-gdal-config=GDAL_CONFIG    use gdal-config specified ],
95[
96  GDAL_CONFIG=$withval;
97  echo "using "$GDAL_CONFIG" for gdal-config";
98],[
99  PROG="gdal-config";
100  AC_PATH_PROG(GDAL_CONFIG, $PROG, "", $PATH)
101])
102
103if test "x$GDAL_CONFIG" != "x"; then
104  GDAL_CFLAGS=`$GDAL_CONFIG --cflags`
105  GDAL_LIBS=`$GDAL_CONFIG --libs`
106  AC_SUBST(GDAL_CFLAGS)
107  AC_SUBST(GDAL_LIBS)
108fi
109AM_CONDITIONAL(HAVE_GDAL, test "x$GDAL_CONFIG" != "x")
110
111
112AX_CHECK_TIFF
113if test "x$link_tiff" = "xno"; then
114  exit
115fi
116
117
118AX_CHECK_JPEG
119if test "x$link_jpeg" = "xno"; then
120  exit
121fi
122
123AX_CHECK_PROJ
124if test "x$link_proj" = "xno"; then
125  exit
126fi
127
128AX_CHECK_LTDL
129if test "x$link_ltdl" = "xno"; then
130  exit
131fi
132
133PKG_CHECK_MODULES(PNG, libpng)
134AC_SUBST(PNG_CFLAGS)
135AC_SUBST(PNG_LIBS)
136
137PKG_CHECK_MODULES(FREETYPE2, freetype2)
138AC_SUBST(FREETYPE2_CFLAGS)
139AC_SUBST(FREETYPE2_LIBS)
140
141dnl Check for option to enable included-agg
142AC_MSG_CHECKING(whether to enable included libagg building)
143AC_ARG_ENABLE(included_agg,
144        [  --enable-included-agg=[no/yes]        enables included libagg build (default=yes)],,
145                 enable_included_agg=yes)
146
147AM_CONDITIONAL(BUILD_AGG, test "x$enable_included_agg" = "xyes")
148
149if [ test "x$enable_included_agg" = "xyes"]; then
150  AGG_LIBS=-L../agg/src
151  AGG_CFLAGS=-I../agg/include
152  AC_SUBST(AGG_LIBS)
153  AC_SUBST(AGG_CFLAGS)
154 
155  AC_MSG_RESULT(yes)
156else
157  AC_MSG_RESULT(no)
158  PKG_CHECK_MODULES(AGG, libagg)
159fi
160
161
162dnl Check for option to enable libxml2
163AC_MSG_CHECKING(whether to enable libxml2 support)
164AC_ARG_ENABLE(libxml2,
165        [  --enable-libxml2=[no/yes]        enables libxml2 support (default=no)],,
166                 enable_libxml2=no)
167
168AM_CONDITIONAL(HAVE_LIBXML2, test "x$enable_libxml2" = "xyes")
169
170if [ test "x$enable_libxml2" = "xyes"]; then
171  AC_MSG_RESULT(yes)
172  PKG_CHECK_MODULES(LIBXML2, libxml-2.0)
173  AC_DEFINE(HAVE_LIBXML2, 1,"")
174else
175  AC_MSG_RESULT(no)
176fi
177
178dnl Check for option to enable cairo
179AC_MSG_CHECKING(whether to enable cairo support)
180AC_ARG_ENABLE(cairo,
181        [  --enable-cairo=[no/yes]        enables cairo support (default=yes)],,
182                 enable_cairo=yes)
183
184AM_CONDITIONAL(HAVE_CAIRO, test "x$enable_cairo" = "xyes")
185
186if [ test "x$enable_cairo" = "xyes"]; then
187  AC_MSG_RESULT(yes)
188  PKG_CHECK_MODULES(CAIRO, cairomm-1.0 >= 1.4.4)
189  dnl AC_DEFINE(HAVE_CAIRO, 1,"")
190else
191  AC_MSG_RESULT(no)
192fi
193
194
195AC_OUTPUT([
196Makefile
197include/Makefile
198include/mapnik/Makefile
199plugins/Makefile
200plugins/input/Makefile
201plugins/input/gdal/Makefile
202plugins/input/postgis/Makefile
203plugins/input/raster/Makefile
204plugins/input/shape/Makefile
205plugins/input/osm/Makefile
206src/Makefile
207mapnik.pc
208mapnik-uninstalled.pc
209agg/Makefile
210agg/src/Makefile
211agg/include/Makefile
212])
Note: See TracBrowser for help on using the browser.