| 1 | dnl Process this file with autoconf to produce a configure script. |
|---|
| 2 | dnl Created by Anjuta application wizard. |
|---|
| 3 | |
|---|
| 4 | AC_INIT(mapnik, 0.5.1) |
|---|
| 5 | |
|---|
| 6 | AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) |
|---|
| 7 | AM_CONFIG_HEADER(config.h) |
|---|
| 8 | AM_MAINTAINER_MODE |
|---|
| 9 | |
|---|
| 10 | dnl Disable libtool 1.5 support for languages we don't use |
|---|
| 11 | define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl |
|---|
| 12 | define([AC_LIBTOOL_LANG_GCJ_CONFIG], [:])dnl |
|---|
| 13 | |
|---|
| 14 | AC_ISC_POSIX |
|---|
| 15 | AC_PROG_CXX |
|---|
| 16 | AM_PROG_CC_STDC |
|---|
| 17 | AC_HEADER_STDC |
|---|
| 18 | |
|---|
| 19 | AM_PROG_LIBTOOL |
|---|
| 20 | |
|---|
| 21 | dnl Check for option to enable debug |
|---|
| 22 | AC_MSG_CHECKING(whether to enable debugging) |
|---|
| 23 | AC_ARG_ENABLE(debug, |
|---|
| 24 | [ --enable-debug=[no/yes] enables debug build (default=no)],, |
|---|
| 25 | enable_debug=no) |
|---|
| 26 | |
|---|
| 27 | dnl Checks for libraries |
|---|
| 28 | if [ ! 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) |
|---|
| 32 | else |
|---|
| 33 | AC_MSG_RESULT(no) |
|---|
| 34 | fi |
|---|
| 35 | |
|---|
| 36 | |
|---|
| 37 | dnl Check for boost |
|---|
| 38 | AX_BOOST_BASE |
|---|
| 39 | if test "$succeeded" != "yes" ; then |
|---|
| 40 | echo "Error: You need to install the boost library!" |
|---|
| 41 | exit |
|---|
| 42 | fi |
|---|
| 43 | |
|---|
| 44 | AX_BOOST_THREAD |
|---|
| 45 | if 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 |
|---|
| 50 | fi |
|---|
| 51 | |
|---|
| 52 | AX_BOOST_FILESYSTEM |
|---|
| 53 | if 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 |
|---|
| 58 | fi |
|---|
| 59 | |
|---|
| 60 | AX_BOOST_REGEX |
|---|
| 61 | if 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 |
|---|
| 66 | fi |
|---|
| 67 | |
|---|
| 68 | AX_BOOST_SERIALIZATION |
|---|
| 69 | if 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 |
|---|
| 74 | fi |
|---|
| 75 | |
|---|
| 76 | AX_BOOST_IOSTREAMS |
|---|
| 77 | if 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 |
|---|
| 82 | fi |
|---|
| 83 | |
|---|
| 84 | |
|---|
| 85 | AX_LIB_POSTGRESQL |
|---|
| 86 | if test "x$found_postgresql" = "xyes"; then |
|---|
| 87 | echo "checking whether to enable postgresql... yes" |
|---|
| 88 | else |
|---|
| 89 | echo "checking whether to enable postgresql... no" |
|---|
| 90 | fi |
|---|
| 91 | AM_CONDITIONAL(HAVE_POSTGRESQL, test "x$found_postgresql" = "xyes") |
|---|
| 92 | |
|---|
| 93 | AC_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 | |
|---|
| 103 | if 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) |
|---|
| 108 | fi |
|---|
| 109 | AM_CONDITIONAL(HAVE_GDAL, test "x$GDAL_CONFIG" != "x") |
|---|
| 110 | |
|---|
| 111 | |
|---|
| 112 | AX_CHECK_TIFF |
|---|
| 113 | if test "x$link_tiff" = "xno"; then |
|---|
| 114 | exit |
|---|
| 115 | fi |
|---|
| 116 | |
|---|
| 117 | |
|---|
| 118 | AX_CHECK_JPEG |
|---|
| 119 | if test "x$link_jpeg" = "xno"; then |
|---|
| 120 | exit |
|---|
| 121 | fi |
|---|
| 122 | |
|---|
| 123 | AX_CHECK_PROJ |
|---|
| 124 | if test "x$link_proj" = "xno"; then |
|---|
| 125 | exit |
|---|
| 126 | fi |
|---|
| 127 | |
|---|
| 128 | AX_CHECK_LTDL |
|---|
| 129 | if test "x$link_ltdl" = "xno"; then |
|---|
| 130 | exit |
|---|
| 131 | fi |
|---|
| 132 | |
|---|
| 133 | PKG_CHECK_MODULES(PNG, libpng) |
|---|
| 134 | AC_SUBST(PNG_CFLAGS) |
|---|
| 135 | AC_SUBST(PNG_LIBS) |
|---|
| 136 | |
|---|
| 137 | PKG_CHECK_MODULES(FREETYPE2, freetype2) |
|---|
| 138 | AC_SUBST(FREETYPE2_CFLAGS) |
|---|
| 139 | AC_SUBST(FREETYPE2_LIBS) |
|---|
| 140 | |
|---|
| 141 | dnl Check for option to enable included-agg |
|---|
| 142 | AC_MSG_CHECKING(whether to enable included libagg building) |
|---|
| 143 | AC_ARG_ENABLE(included_agg, |
|---|
| 144 | [ --enable-included-agg=[no/yes] enables included libagg build (default=yes)],, |
|---|
| 145 | enable_included_agg=yes) |
|---|
| 146 | |
|---|
| 147 | AM_CONDITIONAL(BUILD_AGG, test "x$enable_included_agg" = "xyes") |
|---|
| 148 | |
|---|
| 149 | if [ 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) |
|---|
| 156 | else |
|---|
| 157 | AC_MSG_RESULT(no) |
|---|
| 158 | PKG_CHECK_MODULES(AGG, libagg) |
|---|
| 159 | fi |
|---|
| 160 | |
|---|
| 161 | |
|---|
| 162 | dnl Check for option to enable libxml2 |
|---|
| 163 | AC_MSG_CHECKING(whether to enable libxml2 support) |
|---|
| 164 | AC_ARG_ENABLE(libxml2, |
|---|
| 165 | [ --enable-libxml2=[no/yes] enables libxml2 support (default=no)],, |
|---|
| 166 | enable_libxml2=no) |
|---|
| 167 | |
|---|
| 168 | AM_CONDITIONAL(HAVE_LIBXML2, test "x$enable_libxml2" = "xyes") |
|---|
| 169 | |
|---|
| 170 | if [ 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,"") |
|---|
| 174 | else |
|---|
| 175 | AC_MSG_RESULT(no) |
|---|
| 176 | fi |
|---|
| 177 | |
|---|
| 178 | dnl Check for option to enable cairo |
|---|
| 179 | AC_MSG_CHECKING(whether to enable cairo support) |
|---|
| 180 | AC_ARG_ENABLE(cairo, |
|---|
| 181 | [ --enable-cairo=[no/yes] enables cairo support (default=yes)],, |
|---|
| 182 | enable_cairo=yes) |
|---|
| 183 | |
|---|
| 184 | AM_CONDITIONAL(HAVE_CAIRO, test "x$enable_cairo" = "xyes") |
|---|
| 185 | |
|---|
| 186 | if [ 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,"") |
|---|
| 190 | else |
|---|
| 191 | AC_MSG_RESULT(no) |
|---|
| 192 | fi |
|---|
| 193 | |
|---|
| 194 | |
|---|
| 195 | AC_OUTPUT([ |
|---|
| 196 | Makefile |
|---|
| 197 | include/Makefile |
|---|
| 198 | include/mapnik/Makefile |
|---|
| 199 | plugins/Makefile |
|---|
| 200 | plugins/input/Makefile |
|---|
| 201 | plugins/input/gdal/Makefile |
|---|
| 202 | plugins/input/postgis/Makefile |
|---|
| 203 | plugins/input/raster/Makefile |
|---|
| 204 | plugins/input/shape/Makefile |
|---|
| 205 | plugins/input/osm/Makefile |
|---|
| 206 | src/Makefile |
|---|
| 207 | mapnik.pc |
|---|
| 208 | mapnik-uninstalled.pc |
|---|
| 209 | agg/Makefile |
|---|
| 210 | agg/src/Makefile |
|---|
| 211 | agg/include/Makefile |
|---|
| 212 | ]) |
|---|