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