]> git.street.me.uk Git - andy/viking.git/blame - configure.ac
viking-cache.py tool: Enable converting from OSM cache layout to mbtiles.
[andy/viking.git] / configure.ac
CommitLineData
9903c388
EB
1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
e817bcf6 4AC_PREREQ(2.64)
51d6704c 5AC_INIT(viking, 1.6.1, , viking, http://viking.sf.net/)
5b65af92 6AM_INIT_AUTOMAKE([dist-bzip2 dist-zip subdir-objects])
9903c388 7dnl AC_CONFIG_SRCDIR([src/main.c])
8fe95819 8AC_CONFIG_HEADERS([src/config.h])
306ab474
GB
9
10# check for gtk-doc
11m4_ifdef([GTK_DOC_CHECK], [
12GTK_DOC_CHECK([1.0],[--flavour no-tmpl])
13],[
14AM_CONDITIONAL([ENABLE_GTK_DOC], false)
15])
9903c388 16
d605e023 17AC_PROG_CC
dbebd375 18AC_PROG_CC_STDC
9903c388 19# Checks for programs.
9903c388 20AC_PROG_MAKE_SET
b6e6dfbd 21AC_PROG_RANLIB
8f661d80 22AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)
9903c388 23
a5daec1c
GB
24# I18N
25GETTEXT_PACKAGE=viking
26AC_SUBST(GETTEXT_PACKAGE)
27AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
28
29AM_GLIB_DEFINE_LOCALEDIR(LOCALEDIR)
30
316407e2
GB
31AM_GNU_GETTEXT_VERSION([0.17])
32AM_GNU_GETTEXT([external])
33
d44b1562 34IT_PROG_INTLTOOL([0.35.0])
a5daec1c
GB
35
36AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/po/LINGUAS'])
37
38dnl This will cause the automake generated makefiles to pass the
39dnl correct flags to aclocal.
40ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
41AC_SUBST(ACLOCAL_AMFLAGS)
42
9903c388
EB
43# Checks for header files.
44AC_HEADER_STDC
db7fa5f6 45AC_CHECK_HEADERS([malloc.h stdlib.h string.h sys/param.h sys/types.h unistd.h math.h utime.h X11/Xlib.h])
9903c388
EB
46
47# Checks for typedefs, structures, and compiler characteristics.
48AC_C_CONST
49AC_TYPE_MODE_T
50
fa3eb9d6 51# Checks for library functions or symbols
9903c388
EB
52AC_FUNC_STAT
53AC_FUNC_STRTOD
c72092ea 54AC_CHECK_FUNCS([floor memset mkdtemp pow realpath sqrt strcasecmp strchr strncasecmp strtol strtoul])
fabfa349
JB
55AC_CHECK_LIB(m, tan)
56AC_CHECK_LIB(z, inflate)
fa3eb9d6 57AC_CHECK_LIB(X11, XSetErrorHandler)
9903c388 58
d07deb3f
RN
59# ATM not running automake under Windows
60#AC_CHECK_PROG(USE_WINDOWS, cmd.exe, yes, no)
61#AM_CONDITIONAL([WINDOWS], [test x$USE_WINDOWS = xyes])
62# So pass in as an option instead
63# This is only to perform slightly different build steps
64# (the code uses standard WINDOWS defines for any specific different behaviour)
65AC_ARG_ENABLE(windows, AC_HELP_STRING([--enable-windows],
66 [Perform specific Windows build steps (default is no)]),
67 [ac_cv_enable_windows=$enableval],
68 [ac_cv_enable_windows=no])
69AC_CACHE_CHECK([whether to enable Windows build steps],
70 [ac_cv_enable_windows], [ac_cv_enable_windows=no])
71AM_CONDITIONAL([WINDOWS], [test x$ac_cv_enable_windows = xyes])
72
dad55b79 73# Expat
fa1b5a5f
GB
74AM_WITH_EXPAT
75
3292ba8b 76# Curl
f901dcdf 77LIBCURL_CHECK_CONFIG([yes],[],[],[AC_MSG_ERROR([libcurl is needed but not found])])
3292ba8b 78
bf0922c7 79# gdk-pixbuf-csource
fa1b5a5f 80AC_CHECK_PROG([GDK_PIXBUF_CSOURCE],gdk-pixbuf-csource,[yes])
4dc7f2cc 81if test "x$GDK_PIXBUF_CSOURCE" != "xyes"
fa1b5a5f
GB
82then
83 AC_MSG_ERROR([gdk-pixbuf-csource is needed but not found])
84fi
85
bf0922c7
GB
86dnl ------------------
87dnl | Pkgconfig checks |---------------------------------------
88dnl ------------------
89
90PKG_CHECK_MODULES(PACKAGE, [
e817bcf6 91 glib-2.0 >= 2.26
bf0922c7 92 gthread-2.0 >= 2.2
90ba111c 93 gtk+-2.0 >= 2.16
314084b8 94 gio-2.0 >= 2.12
bf0922c7
GB
95])
96
97AC_SUBST(PACKAGE_CFLAGS)
98AC_SUBST(PACKAGE_LIBS)
99
f8b8a0b5
GB
100dnl -------------
101dnl | User Manual |---------------------------------------
102dnl -------------
103GNOME_DOC_INIT
dad55b79 104
bca29d33
GB
105dnl ---------------------------------------------------------------------------
106dnl - Use deprecated options (default enabled for devs, disabled in releases)
107dnl ---------------------------------------------------------------------------
108
79452f0e
GB
109AC_ARG_ENABLE(deprecations,
110 [AC_HELP_STRING([--enable-deprecations],
bca29d33
GB
111 [warn about deprecated usages [default=no]])],
112 [ac_cv_enable_deprecations=$enableval],
113 [ac_cv_enable_deprecations=no])
114AC_CACHE_CHECK([whether to enable deprecated features],
115 [ac_cv_enable_deprecations], [ac_cv_enable_deprecations=no])
79452f0e 116
bca29d33 117if test "x$ac_cv_enable_deprecations" = "xyes"; then
79452f0e 118 DISABLE_DEPRECATED_CFLAGS="\
bca29d33
GB
119-DG_DISABLE_SINGLE_INCLUDES \
120-DGSEAL_ENABLE \
79452f0e
GB
121-DG_DISABLE_DEPRECATED \
122-DGDK_DISABLE_DEPRECATED \
bca29d33
GB
123-DGDK_PIXBUF_DISABLE_DEPRECATED \
124-DGTK_DISABLE_SINGLE_INCLUDES \
125-DGTK_DISABLE_DEPRECATED"
126 CPPFLAGS="$CPPFLAGS $DISABLE_DEPRECATED_CFLAGS"
79452f0e 127fi
dad55b79 128
734652bf 129# Options
9f58c4b4
GB
130AC_ARG_ENABLE(bing, AC_HELP_STRING([--enable-bing],
131 [enable Bing stuff (default is enable)]),
132 [ac_cv_enable_bing=$enableval],
133 [ac_cv_enable_bing=yes])
134AC_CACHE_CHECK([whether to enable Bing stuff],
135 [ac_cv_enable_bing], [ac_cv_enable_bing=yes])
136case $ac_cv_enable_bing in
137 yes)
138 AC_DEFINE(VIK_CONFIG_BING, [], [BING STUFF])
139 ;;
140esac
141AM_CONDITIONAL([BING], [test x$ac_cv_enable_bing = xyes])
142
cdcaf41c 143AC_ARG_ENABLE(google, AC_HELP_STRING([--enable-google],
55340efa 144 [enable Google stuff (default is enable)]),
cdcaf41c
QT
145 [ac_cv_enable_google=$enableval],
146 [ac_cv_enable_google=yes])
147AC_CACHE_CHECK([whether to enable Google stuff],
148 [ac_cv_enable_google], [ac_cv_enable_google=yes])
149case $ac_cv_enable_google in
150 yes)
151 AC_DEFINE(VIK_CONFIG_GOOGLE, [], [GOOGLE STUFF])
152 ;;
153esac
154AM_CONDITIONAL([GOOGLE], [test x$ac_cv_enable_google = xyes])
155
156AC_ARG_ENABLE(terraserver, AC_HELP_STRING([--enable-terraserver],
2a8ecaba 157 [enable Terraserver stuff (default is disabled as the tileserver is no longer available)]),
cdcaf41c 158 [ac_cv_enable_terraserver=$enableval],
2a8ecaba 159 [ac_cv_enable_terraserver=no])
cdcaf41c
QT
160AC_CACHE_CHECK([whether to enable Terraserver stuff],
161 [ac_cv_enable_terraserver], [ac_cv_enable_terraserver=yes])
162case $ac_cv_enable_terraserver in
163 yes)
164 AC_DEFINE(VIK_CONFIG_TERRASERVER, [], [TERRASERVER STUFF])
165 ;;
166esac
167AM_CONDITIONAL([TERRASERVER], [test x$ac_cv_enable_terraserver = xyes])
168
169AC_ARG_ENABLE(expedia, AC_HELP_STRING([--enable-expedia],
06f31fd5 170 [enable Expedia stuff (default is disable)]),
cdcaf41c 171 [ac_cv_enable_expedia=$enableval],
06f31fd5 172 [ac_cv_enable_expedia=no])
cdcaf41c
QT
173AC_CACHE_CHECK([whether to enable Expedia stuff],
174 [ac_cv_enable_expedia], [ac_cv_enable_expedia=yes])
175case $ac_cv_enable_expedia in
176 yes)
177 AC_DEFINE(VIK_CONFIG_EXPEDIA, [], [EXPEDIA STUFF])
178 ;;
179esac
180AM_CONDITIONAL([EXPEDIA], [test x$ac_cv_enable_expedia = xyes])
181
ca9eb04a
GB
182# OpenStreetMap http://www.openstreetmap.org/
183AC_ARG_ENABLE(openstreetmap, AC_HELP_STRING([--enable-openstreetmap],
184 [enable OpenStreetMap stuff (default is enable)]),
185 [ac_cv_enable_openstreetmap=$enableval],
186 [ac_cv_enable_openstreetmap=yes])
187AC_CACHE_CHECK([whether to enable OpenStreetMap stuff],
188 [ac_cv_enable_openstreetmap], [ac_cv_enable_openstreetmap=yes])
189case $ac_cv_enable_openstreetmap in
190 yes)
191 AC_DEFINE(VIK_CONFIG_OPENSTREETMAP, [], [OPENSTREETMAP STUFF])
192 ;;
193esac
194AM_CONDITIONAL([OPENSTREETMAP], [test x$ac_cv_enable_openstreetmap = xyes])
195
96c3f0d5
GB
196# BlueMarble
197AC_ARG_ENABLE(bluemarble, AC_HELP_STRING([--enable-bluemarble],
198 [enable BlueMarble stuff (default is enable)]),
199 [ac_cv_enable_bluemarble=$enableval],
200 [ac_cv_enable_bluemarble=yes])
201AC_CACHE_CHECK([whether to enable BlueMarble stuff],
202 [ac_cv_enable_bluemarble], [ac_cv_enable_bluemarble=yes])
203case $ac_cv_enable_bluemarble in
204 yes)
205 AC_DEFINE(VIK_CONFIG_BLUEMARBLE, [], [BLUEMARBLE STUFF])
206 ;;
207esac
208AM_CONDITIONAL([BLUEMARBLE], [test x$ac_cv_enable_bluemarble = xyes])
209
da03b29d
GB
210# GeoNames http://www.geonames.org/
211AC_ARG_ENABLE(geonames, AC_HELP_STRING([--enable-geonames],
212 [enable Geonames stuff (default is enable)]),
213 [ac_cv_enable_geonames=$enableval],
214 [ac_cv_enable_geonames=yes])
215AC_CACHE_CHECK([whether to enable Geonames stuff],
216 [ac_cv_enable_geonames], [ac_cv_enable_geonames=yes])
217case $ac_cv_enable_geonames in
218 yes)
219 AC_DEFINE(VIK_CONFIG_GEONAMES, [], [GEONAMES STUFF])
220 ;;
221esac
222AM_CONDITIONAL([GEONAMES], [test x$ac_cv_enable_geonames = xyes])
223
1ef9e637 224AC_ARG_ENABLE(geocaches, AC_HELP_STRING([--enable-geocaches],
a0d39f7e 225 [enable Geocaches Acquire (default is disable).]),
1ef9e637
QT
226 [ac_cv_enable_geocaches=$enableval],
227 [ac_cv_enable_geocaches=no])
228AC_CACHE_CHECK([whether to enable Geocaches Acquire],
229 [ac_cv_enable_geocaches], [ac_cv_enable_geocaches=yes])
230case $ac_cv_enable_geocaches in
231 yes)
232 AC_DEFINE(VIK_CONFIG_GEOCACHES, [], [GEOCACHES STUFF])
233 ;;
234esac
235AM_CONDITIONAL([GEOCACHES], [test x$ac_cv_enable_geocaches = xyes])
236
72bbd562
RN
237# Geotagging
238AC_ARG_WITH(libexif, AC_HELP_STRING([--with-libexif], [Force usage of libexif instead of libgexiv2]))
f75d0233
RN
239AC_ARG_ENABLE(geotag, AC_HELP_STRING([--enable-geotag],
240 [enable Geotag Support (default is enable).]),
241 [ac_cv_enable_geotag=$enableval],
242 [ac_cv_enable_geotag=yes])
243AC_CACHE_CHECK([whether to enable Geotag Support],
244 [ac_cv_enable_geotag], [ac_cv_enable_geotag=yes])
245case $ac_cv_enable_geotag in
246 yes)
72bbd562
RN
247 AS_IF([test x$with_libexif = xyes],
248 AC_CHECK_HEADER([libexif/exif-data.h],[],AC_MSG_ERROR([exif-data.h is needed but not found - you will need to install package 'libexif-dev' or similar]))
249 AC_CHECK_LIB(exif,exif_loader_new,, AC_MSG_ERROR([libexif is not found but it has been forcibly required])),
250 # gexiv2.h relies on glib so a simple compile check fails.
251 #AC_CHECK_HEADER([gexiv2/gexiv2.h],,AC_MSG_ERROR([Error msg...]))
252 AC_CHECK_LIB(gexiv2,gexiv2_metadata_new,, AC_MSG_ERROR([libgexiv2 is needed but not found - you will need to install package 'libgexiv2-dev' or similar. The feature can be disabled with --disable-geotag]))
253 )
f75d0233
RN
254 AC_DEFINE(VIK_CONFIG_GEOTAG, [], [GEOTAG STUFF])
255 ;;
256esac
257AM_CONDITIONAL([GEOTAG], [test x$ac_cv_enable_geotag = xyes])
72bbd562
RN
258AM_CONDITIONAL([GEXIV2], [test x$ac_cv_lib_gexiv2_gexiv2_metadata_new = xyes] )
259# Tested with gexiv2 0.10.2, but probably would work with older versions; may be all of them...
260#AM_COND_IF([GEXIV2], [PKG_CHECK_MODULES([GEXIV2], [gexiv2 >= 0.6.1])])
261AM_CONDITIONAL([LIBEXIF], [test x$ac_cv_lib_exif_exif_loader_new = xyes] )
f75d0233 262
8c721f83
EB
263AC_ARG_ENABLE(dem24k, AC_HELP_STRING([--enable-dem24k],
264 [enable USGS 24k DEM (default is disable) download source. Requires dem24k.pl script in path.]),
265 [ac_cv_enable_dem24k=$enableval],
266 [ac_cv_enable_dem24k=no])
267AC_CACHE_CHECK([whether to enable USGS DEM 24k download source],
268 [ac_cv_enable_dem24k], [ac_cv_enable_dem24k=yes])
269case $ac_cv_enable_dem24k in
270 yes)
271 AC_DEFINE(VIK_CONFIG_DEM24K, [], [DEM24K STUFF])
272 ;;
273esac
274AM_CONDITIONAL([DEM24K], [test x$ac_cv_enable_dem24k = xyes])
275
001a86db
QT
276# Realtime GPS tracking
277AC_ARG_ENABLE(realtime-gps-tracking, AC_HELP_STRING([--enable-realtime-gps-tracking],
278 [enable realtime GPS tracking (default is enable)]),
279 [ac_cv_enable_realtimegpstracking=$enableval],
280 [ac_cv_enable_realtimegpstracking=yes])
281AC_CACHE_CHECK([whether to enable Realtime GPS Tracking stuff],
282 [ac_cv_enable_realtimegpstracking], [ac_cv_enable_realtimegpstracking=yes])
283case $ac_cv_enable_realtimegpstracking in
284 yes)
975e9067 285 AC_CHECK_LIB(gps,gps_close,,AC_MSG_ERROR([libgps is needed for Realtime GPS Tracking feature[,] but not found. The feature can be disable with --disable-realtime-gps-tracking]))
8956d2ef 286 AC_DEFINE(VIK_CONFIG_REALTIME_GPS_TRACKING, [], [REALTIME GPS TRACKING STUFF])
001a86db
QT
287 ;;
288esac
289AM_CONDITIONAL([REALTIME_GPS_TRACKING], [test x$ac_cv_enable_realtimegpstracking = xyes])
290
a3697549 291# BZIP2
b1db5b51 292AC_ARG_ENABLE(bzip2, AC_HELP_STRING([--enable-bzip2],
a3697549
RN
293 [enable bzip2 Support (default is enable).]),
294 [ac_cv_enable_bzip2=$enableval],
295 [ac_cv_enable_bzip2=yes])
296AC_CACHE_CHECK([whether to enable bzip2 Support],
297 [ac_cv_enable_bzip2], [ac_cv_enable_bzip2=yes])
298case $ac_cv_enable_bzip2 in
299 yes)
300 AC_CHECK_HEADERS([bzlib.h],[],[AC_MSG_ERROR([bzlib.h is needed but not found - you will need to install package 'libbz2-dev' or similar. The feature can be disabled with --disable-bzip2])])
301 AC_CHECK_LIB(bz2, BZ2_bzBuffToBuffDecompress, [], [AC_MSG_ERROR([libbz2 is needed but not found.])])
302 ;;
303esac
304AM_CONDITIONAL([BZIP2], [test x$ac_cv_enable_bzip2 = xyes])
305
306# FILE MAGIC
307AC_ARG_ENABLE(magic, AC_HELP_STRING([--enable-magic],
308 [enable File Magic support via libmagic (default is enable).]),
309 [ac_cv_enable_magic=$enableval],
310 [ac_cv_enable_magic=yes])
311AC_CACHE_CHECK([whether to enable Magic Support],
312 [ac_cv_enable_magic], [ac_cv_enable_magic=yes])
313case $ac_cv_enable_magic in
314 yes)
315 AC_CHECK_HEADERS([magic.h],[],[AC_MSG_ERROR([magic.h is needed but not found - you will need to install package 'libmagic-dev' or similar. The feature can be disabled with --disable-magic])])
316 AC_CHECK_LIB(magic, magic_open, [], [AC_MSG_ERROR([libmagic is needed but not found.])])
317 ;;
318esac
319AM_CONDITIONAL([MAGIC], [test x$ac_cv_enable_magic = xyes])
320
0fb11294
RN
321# SQL for MBTiles
322AC_ARG_ENABLE(mbtiles, AC_HELP_STRING([--enable-mbtiles],
323 [enable MBTiles support via libsqlite3 (default is enable).]),
324 [ac_cv_enable_mbtiles=$enableval],
325 [ac_cv_enable_mbtiles=yes])
326AC_CACHE_CHECK([whether to enable MBTiles Support],
327 [ac_cv_enable_mbtiles], [ac_cv_enable_mbtiles=yes])
328case $ac_cv_enable_mbtiles in
329 yes)
9324e651 330 AC_CHECK_HEADERS([sqlite3.h],[],[AC_MSG_ERROR([sqlite3.h is needed but not found - you will need to install package 'libsqlite3-dev' or similar. The feature can be disabled with --disable-mbtiles])])
0fb11294
RN
331 AC_CHECK_LIB(sqlite3, sqlite3_open, [], [AC_MSG_ERROR([libsqlite3 is needed but not found.])])
332 ;;
333esac
334AM_CONDITIONAL([SQLITE], [test x$ac_cv_enable_mbtiles = xyes])
335
49d43d14
RN
336# Standard compression is handled by libz
337# libzip enables a friendlier file based interface
338# libzip itself depends on libz (which is required in the Viking build ATM)
339# ZIP
340AC_ARG_ENABLE(zip, AC_HELP_STRING([--enable-zip],
341 [enable zip support (default is enable).]),
342 [ac_cv_enable_zip=$enableval],
343 [ac_cv_enable_zip=yes])
344AC_CACHE_CHECK([whether to enable zip Support],
345 [ac_cv_enable_zip], [ac_cv_enable_zip=yes])
346case $ac_cv_enable_zip in
347 yes)
348 # NB As far as I can tell libzip doesn't provide any versioning info within the header code itself
349 # Thus supporting old versions via simple #if #else #endif directives is seemingly not possible
350 # Resort to checking versioning only via pkgconfig
351 PKG_CHECK_MODULES([LIBZIP], [libzip >= 0.11],
ab922442 352 [ AC_CHECK_HEADERS([zip.h],[],[AC_MSG_ERROR([zip.h is needed but not found - you will need to install package 'libzip-dev' or similar. The feature can be disabled with --disable-zip])])
49d43d14
RN
353 AC_CHECK_LIB(zip, [main], [], [AC_MSG_ERROR([libzip is needed but not found.])]) ],
354 [ AC_MSG_WARN([libzip version needs to be at least 0.11, use of libzip is disabled])
355 ac_cv_enable_zip=no ]
356 )
357 ;;
358esac
359AM_CONDITIONAL([ZIP], [test x$ac_cv_enable_zip = xyes])
360
5fa4fe86
RN
361# Mapnik rendering layer
362AC_ARG_ENABLE(mapnik, AC_HELP_STRING([--enable-mapnik],
363 [enable Mapnik (default is enable)]),
364 [ac_cv_enable_mapnik=$enableval],
365 [ac_cv_enable_mapnik=yes])
366AC_CACHE_CHECK([whether to enable Mapnik],
367 [ac_cv_enable_mapnik], [ac_cv_enable_mapnik=yes])
368case $ac_cv_enable_mapnik in
369 yes)
370 # C++
371 AC_LANG_CPLUSPLUS
372 AC_LANG_SAVE
373 AC_PROG_CXX
616812b7
RN
374 # Mapnik3 requires C++11. Viking will use C++11 as well.
375 CXXFLAGS="$CXXFLAGS -std=c++11"
5fa4fe86
RN
376 # Too difficult to get check working under Windows (extra dependencies needed probably Boost)- so just skip it
377 if test "x$ac_cv_enable_windows" = "xno"; then
378 AC_CHECK_HEADER([mapnik/map.hpp],[],[AC_MSG_ERROR([mapnik/map.hpp is needed but not found - you will need to install package 'libmapnik-dev' or similar. The feature can be disabled with --disable-mapnik])])
379 fi
380 AC_CHECK_LIB([mapnik], [main], [], [AC_MSG_ERROR([libmapnik is needed but not found.])])
381 AC_CHECK_LIB([stdc++], [main], [], [AC_MSG_ERROR([libstdc++ is needed but not found.])])
616812b7
RN
382 # Required for Mapnik3 build (it's also in Mapnik2 but does not need to be specified for some reason)
383 # it's part of libmapnik install dependencies
384 AC_CHECK_LIB([icuuc], [main], [], [AC_MSG_ERROR([libicuuc is needed but not found.])])
5fa4fe86
RN
385 AC_LANG_RESTORE
386 ;;
387esac
388AM_CONDITIONAL([MAPNIK], [test x$ac_cv_enable_mapnik = xyes])
a3697549
RN
389###
390
5fa4fe86
RN
391## WORK AROUND BROKEN autoconf - see http://lists.gnu.org/archive/html/bug-automake/2002-11/msg00020.html
392m4_pushdef([AC_MSG_ERROR])
393AC_PROG_CXX
394m4_popdef([AC_MSG_ERROR])
395##
396
ba4a5e11 397
1bc9b120
GB
398AC_ARG_WITH(mapcache,
399 [AC_HELP_STRING([--with-mapcache],
e6e277a8 400 [specify the size of the map cache in MB (default is 128)])],
1bc9b120
GB
401 [if test "x$withval" = "xno"; then
402 VIK_CONFIG_MAPCACHE_SIZE=0;
403 elif test "x$withval" = "xyes"; then
e6e277a8 404 AC_MSG_ERROR([Please, set a value for size of the map cache in MB])
1bc9b120
GB
405 else
406 VIK_CONFIG_MAPCACHE_SIZE=${withval}
407 fi],
e6e277a8 408 [VIK_CONFIG_MAPCACHE_SIZE=128])
1bc9b120
GB
409AC_DEFINE_UNQUOTED(VIK_CONFIG_MAPCACHE_SIZE, ${VIK_CONFIG_MAPCACHE_SIZE},
410 [Size of the map cache])
411
5e108809
GB
412
413AC_ARG_WITH(tileage,
414 [AC_HELP_STRING([--with-tileage],
7965485d 415 [specify the age of a tile before checking it (default is 7 days)])],
5e108809
GB
416 [if test "x$withval" = "xno"; then
417 VIK_CONFIG_DEFAULT_TILE_AGE=0;
418 elif test "x$withval" = "xyes"; then
419 AC_MSG_ERROR([Please, set a value for age of tiles])
420 else
421 VIK_CONFIG_DEFAULT_TILE_AGE=${withval}
422 fi],
7965485d 423 [VIK_CONFIG_DEFAULT_TILE_AGE=604800])
5e108809 424AC_DEFINE_UNQUOTED(VIK_CONFIG_DEFAULT_TILE_AGE, ${VIK_CONFIG_DEFAULT_TILE_AGE},
8276d332 425 [Age of tiles before checking it (in seconds)])
aea7a8a3 426AC_DEFINE(HAVE_VIKING, 1, [Enable Viking specifics in otherwise reusable code])
5e108809 427
e5140ce8
GB
428dnl man pages processing
429DB2MAN_XSL=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl
430AC_SUBST(DB2MAN_XSL)
431AC_PATH_PROG(XP,xsltproc)
eb6a42c9 432AM_CONDITIONAL([HAVE_XSLTPROC],[test "x$XP" != "x"])
ba22c385
RN
433AC_CHECK_PROG([HAVE_SCROLLKEEPER],scrollkeeper-config,"yes")
434AM_CONDITIONAL([GEN_MANPAGES],[test "x$XP" != "x" && test -r "$DB2MAN_XSL"] && test "${HAVE_SCROLLKEEPER}" == "yes" )
e5140ce8 435
146e6a79
RN
436ISODATE=`date +%Y-%m-%d`
437AC_SUBST(ISODATE)
438
734652bf 439# Configuration
a07e9f61
RN
440AC_CONFIG_FILES([
441 Makefile
442 src/Makefile
443 src/icons/Makefile
444 po/Makefile.in
445 data/Makefile
69e5d475 446 tools/Makefile
763f5c56 447 test/Makefile
d7603eb2 448 help/Makefile
47179fe3 449 help/viking.xml
763f5c56
RN
450 win32/Makefile
451 win32/installer/Makefile
452 win32/installer/pixmaps/Makefile
306ab474 453 win32/installer/translations/Makefile
a07e9f61
RN
454 doc/Makefile
455 doc/reference/Makefile
306ab474 456 doc/examples/Makefile])
a07e9f61 457
af2740eb
QT
458AC_OUTPUT([
459 viking.spec
460 ])
001a86db
QT
461
462dnl Output the configuration summary
463echo ""
464echo "==========================================="
e817bcf6 465echo "$PACKAGE $PACKAGE_URL $VERSION"
001a86db 466echo "-------------------------------------------"
9f58c4b4 467echo "Bing Maps : $ac_cv_enable_bing"
55340efa 468echo "Google : $ac_cv_enable_google"
001a86db 469echo "Terraserver Maps : $ac_cv_enable_terraserver"
c21cf491 470echo "Expedia Maps : $ac_cv_enable_expedia"
001a86db 471echo "Open Street Map : $ac_cv_enable_openstreetmap"
f7d8a3c2 472echo "BlueMarble : $ac_cv_enable_bluemarble"
da03b29d 473echo "Geonames : $ac_cv_enable_geonames"
de63aedb 474echo "Geocaches Acquire : $ac_cv_enable_geocaches"
72bbd562 475echo "Geotag Support : $ac_cv_enable_geotag (libgexiv2=$ac_cv_lib_gexiv2_gexiv2_metadata_new libexif=$ac_cv_lib_exif_exif_loader_new)"
001a86db
QT
476echo "USGS 24k DEM : $ac_cv_enable_dem24k"
477echo "Realtime GPS Tracking : $ac_cv_enable_realtimegpstracking"
a3697549
RN
478echo "bzip2 Support : $ac_cv_enable_bzip2"
479echo "File Magic Support : $ac_cv_enable_magic"
0fb11294 480echo "MBTiles Support (SQLite3) : $ac_cv_enable_mbtiles"
49d43d14 481echo "Zip File Support (with libzip) : $ac_cv_enable_zip"
5fa4fe86 482echo "Mapnik Rendering Support (C++) : $ac_cv_enable_mapnik"
001a86db 483echo "Size of map cache (in memory) : ${VIK_CONFIG_MAPCACHE_SIZE}"
5e108809 484echo "Age of tiles (in seconds) : ${VIK_CONFIG_DEFAULT_TILE_AGE}"
ba22c385
RN
485echo -n "Man page generation : "
486AM_COND_IF([GEN_MANPAGES], [echo "yes"], [echo "no"])
a07e9f61 487echo "Documentation (+HTML) : ${enable_gtk_doc} (HTML: ${enable_gtk_doc_html})"
001a86db
QT
488echo "-------------------------------------------"
489echo ""
490echo "Configure finished, type 'make' to build."