]>
Commit | Line | Data |
---|---|---|
9903c388 EB |
1 | # -*- Autoconf -*- |
2 | # Process this file with autoconf to produce a configure script. | |
3 | ||
e817bcf6 | 4 | AC_PREREQ(2.64) |
c1648426 | 5 | AC_INIT(viking, 1.6, , viking, http://viking.sf.net/) |
5b65af92 | 6 | AM_INIT_AUTOMAKE([dist-bzip2 dist-zip subdir-objects]) |
9903c388 | 7 | dnl AC_CONFIG_SRCDIR([src/main.c]) |
8fe95819 | 8 | AC_CONFIG_HEADERS([src/config.h]) |
306ab474 GB |
9 | |
10 | # check for gtk-doc | |
11 | m4_ifdef([GTK_DOC_CHECK], [ | |
12 | GTK_DOC_CHECK([1.0],[--flavour no-tmpl]) | |
13 | ],[ | |
14 | AM_CONDITIONAL([ENABLE_GTK_DOC], false) | |
15 | ]) | |
9903c388 | 16 | |
d605e023 | 17 | AC_PROG_CC |
dbebd375 | 18 | AC_PROG_CC_STDC |
9903c388 | 19 | # Checks for programs. |
9903c388 | 20 | AC_PROG_MAKE_SET |
b6e6dfbd | 21 | AC_PROG_RANLIB |
8f661d80 | 22 | AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums) |
9903c388 | 23 | |
a5daec1c GB |
24 | # I18N |
25 | GETTEXT_PACKAGE=viking | |
26 | AC_SUBST(GETTEXT_PACKAGE) | |
27 | AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name]) | |
28 | ||
29 | AM_GLIB_DEFINE_LOCALEDIR(LOCALEDIR) | |
30 | ||
316407e2 GB |
31 | AM_GNU_GETTEXT_VERSION([0.17]) |
32 | AM_GNU_GETTEXT([external]) | |
33 | ||
d44b1562 | 34 | IT_PROG_INTLTOOL([0.35.0]) |
a5daec1c GB |
35 | |
36 | AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/po/LINGUAS']) | |
37 | ||
38 | dnl This will cause the automake generated makefiles to pass the | |
39 | dnl correct flags to aclocal. | |
40 | ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}" | |
41 | AC_SUBST(ACLOCAL_AMFLAGS) | |
42 | ||
9903c388 EB |
43 | # Checks for header files. |
44 | AC_HEADER_STDC | |
db7fa5f6 | 45 | AC_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. | |
48 | AC_C_CONST | |
49 | AC_TYPE_MODE_T | |
50 | ||
fa3eb9d6 | 51 | # Checks for library functions or symbols |
9903c388 EB |
52 | AC_FUNC_STAT |
53 | AC_FUNC_STRTOD | |
c72092ea | 54 | AC_CHECK_FUNCS([floor memset mkdtemp pow realpath sqrt strcasecmp strchr strncasecmp strtol strtoul]) |
fabfa349 JB |
55 | AC_CHECK_LIB(m, tan) |
56 | AC_CHECK_LIB(z, inflate) | |
fa3eb9d6 | 57 | AC_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) | |
65 | AC_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]) | |
69 | AC_CACHE_CHECK([whether to enable Windows build steps], | |
70 | [ac_cv_enable_windows], [ac_cv_enable_windows=no]) | |
71 | AM_CONDITIONAL([WINDOWS], [test x$ac_cv_enable_windows = xyes]) | |
72 | ||
dad55b79 | 73 | # Expat |
fa1b5a5f GB |
74 | AM_WITH_EXPAT |
75 | ||
3292ba8b | 76 | # Curl |
f901dcdf | 77 | LIBCURL_CHECK_CONFIG([yes],[],[],[AC_MSG_ERROR([libcurl is needed but not found])]) |
3292ba8b | 78 | |
bf0922c7 | 79 | # gdk-pixbuf-csource |
fa1b5a5f | 80 | AC_CHECK_PROG([GDK_PIXBUF_CSOURCE],gdk-pixbuf-csource,[yes]) |
4dc7f2cc | 81 | if test "x$GDK_PIXBUF_CSOURCE" != "xyes" |
fa1b5a5f GB |
82 | then |
83 | AC_MSG_ERROR([gdk-pixbuf-csource is needed but not found]) | |
84 | fi | |
85 | ||
bf0922c7 GB |
86 | dnl ------------------ |
87 | dnl | Pkgconfig checks |--------------------------------------- | |
88 | dnl ------------------ | |
89 | ||
90 | PKG_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 | ||
97 | AC_SUBST(PACKAGE_CFLAGS) | |
98 | AC_SUBST(PACKAGE_LIBS) | |
99 | ||
f8b8a0b5 GB |
100 | dnl ------------- |
101 | dnl | User Manual |--------------------------------------- | |
102 | dnl ------------- | |
103 | GNOME_DOC_INIT | |
dad55b79 | 104 | |
bca29d33 GB |
105 | dnl --------------------------------------------------------------------------- |
106 | dnl - Use deprecated options (default enabled for devs, disabled in releases) | |
107 | dnl --------------------------------------------------------------------------- | |
108 | ||
79452f0e GB |
109 | AC_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]) | |
114 | AC_CACHE_CHECK([whether to enable deprecated features], | |
115 | [ac_cv_enable_deprecations], [ac_cv_enable_deprecations=no]) | |
79452f0e | 116 | |
bca29d33 | 117 | if 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 | 127 | fi |
dad55b79 | 128 | |
734652bf | 129 | # Options |
9f58c4b4 GB |
130 | AC_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]) | |
134 | AC_CACHE_CHECK([whether to enable Bing stuff], | |
135 | [ac_cv_enable_bing], [ac_cv_enable_bing=yes]) | |
136 | case $ac_cv_enable_bing in | |
137 | yes) | |
138 | AC_DEFINE(VIK_CONFIG_BING, [], [BING STUFF]) | |
139 | ;; | |
140 | esac | |
141 | AM_CONDITIONAL([BING], [test x$ac_cv_enable_bing = xyes]) | |
142 | ||
cdcaf41c | 143 | AC_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]) | |
147 | AC_CACHE_CHECK([whether to enable Google stuff], | |
148 | [ac_cv_enable_google], [ac_cv_enable_google=yes]) | |
149 | case $ac_cv_enable_google in | |
150 | yes) | |
151 | AC_DEFINE(VIK_CONFIG_GOOGLE, [], [GOOGLE STUFF]) | |
152 | ;; | |
153 | esac | |
154 | AM_CONDITIONAL([GOOGLE], [test x$ac_cv_enable_google = xyes]) | |
155 | ||
156 | AC_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 |
160 | AC_CACHE_CHECK([whether to enable Terraserver stuff], |
161 | [ac_cv_enable_terraserver], [ac_cv_enable_terraserver=yes]) | |
162 | case $ac_cv_enable_terraserver in | |
163 | yes) | |
164 | AC_DEFINE(VIK_CONFIG_TERRASERVER, [], [TERRASERVER STUFF]) | |
165 | ;; | |
166 | esac | |
167 | AM_CONDITIONAL([TERRASERVER], [test x$ac_cv_enable_terraserver = xyes]) | |
168 | ||
169 | AC_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 |
173 | AC_CACHE_CHECK([whether to enable Expedia stuff], |
174 | [ac_cv_enable_expedia], [ac_cv_enable_expedia=yes]) | |
175 | case $ac_cv_enable_expedia in | |
176 | yes) | |
177 | AC_DEFINE(VIK_CONFIG_EXPEDIA, [], [EXPEDIA STUFF]) | |
178 | ;; | |
179 | esac | |
180 | AM_CONDITIONAL([EXPEDIA], [test x$ac_cv_enable_expedia = xyes]) | |
181 | ||
ca9eb04a GB |
182 | # OpenStreetMap http://www.openstreetmap.org/ |
183 | AC_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]) | |
187 | AC_CACHE_CHECK([whether to enable OpenStreetMap stuff], | |
188 | [ac_cv_enable_openstreetmap], [ac_cv_enable_openstreetmap=yes]) | |
189 | case $ac_cv_enable_openstreetmap in | |
190 | yes) | |
191 | AC_DEFINE(VIK_CONFIG_OPENSTREETMAP, [], [OPENSTREETMAP STUFF]) | |
192 | ;; | |
193 | esac | |
194 | AM_CONDITIONAL([OPENSTREETMAP], [test x$ac_cv_enable_openstreetmap = xyes]) | |
195 | ||
96c3f0d5 GB |
196 | # BlueMarble |
197 | AC_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]) | |
201 | AC_CACHE_CHECK([whether to enable BlueMarble stuff], | |
202 | [ac_cv_enable_bluemarble], [ac_cv_enable_bluemarble=yes]) | |
203 | case $ac_cv_enable_bluemarble in | |
204 | yes) | |
205 | AC_DEFINE(VIK_CONFIG_BLUEMARBLE, [], [BLUEMARBLE STUFF]) | |
206 | ;; | |
207 | esac | |
208 | AM_CONDITIONAL([BLUEMARBLE], [test x$ac_cv_enable_bluemarble = xyes]) | |
209 | ||
da03b29d GB |
210 | # GeoNames http://www.geonames.org/ |
211 | AC_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]) | |
215 | AC_CACHE_CHECK([whether to enable Geonames stuff], | |
216 | [ac_cv_enable_geonames], [ac_cv_enable_geonames=yes]) | |
217 | case $ac_cv_enable_geonames in | |
218 | yes) | |
219 | AC_DEFINE(VIK_CONFIG_GEONAMES, [], [GEONAMES STUFF]) | |
220 | ;; | |
221 | esac | |
222 | AM_CONDITIONAL([GEONAMES], [test x$ac_cv_enable_geonames = xyes]) | |
223 | ||
1ef9e637 | 224 | AC_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]) | |
228 | AC_CACHE_CHECK([whether to enable Geocaches Acquire], | |
229 | [ac_cv_enable_geocaches], [ac_cv_enable_geocaches=yes]) | |
230 | case $ac_cv_enable_geocaches in | |
231 | yes) | |
232 | AC_DEFINE(VIK_CONFIG_GEOCACHES, [], [GEOCACHES STUFF]) | |
233 | ;; | |
234 | esac | |
235 | AM_CONDITIONAL([GEOCACHES], [test x$ac_cv_enable_geocaches = xyes]) | |
236 | ||
72bbd562 RN |
237 | # Geotagging |
238 | AC_ARG_WITH(libexif, AC_HELP_STRING([--with-libexif], [Force usage of libexif instead of libgexiv2])) | |
f75d0233 RN |
239 | AC_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]) | |
243 | AC_CACHE_CHECK([whether to enable Geotag Support], | |
244 | [ac_cv_enable_geotag], [ac_cv_enable_geotag=yes]) | |
245 | case $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 | ;; | |
256 | esac | |
257 | AM_CONDITIONAL([GEOTAG], [test x$ac_cv_enable_geotag = xyes]) | |
72bbd562 RN |
258 | AM_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])]) | |
261 | AM_CONDITIONAL([LIBEXIF], [test x$ac_cv_lib_exif_exif_loader_new = xyes] ) | |
f75d0233 | 262 | |
8c721f83 EB |
263 | AC_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]) | |
267 | AC_CACHE_CHECK([whether to enable USGS DEM 24k download source], | |
268 | [ac_cv_enable_dem24k], [ac_cv_enable_dem24k=yes]) | |
269 | case $ac_cv_enable_dem24k in | |
270 | yes) | |
271 | AC_DEFINE(VIK_CONFIG_DEM24K, [], [DEM24K STUFF]) | |
272 | ;; | |
273 | esac | |
274 | AM_CONDITIONAL([DEM24K], [test x$ac_cv_enable_dem24k = xyes]) | |
275 | ||
001a86db QT |
276 | # Realtime GPS tracking |
277 | AC_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]) | |
281 | AC_CACHE_CHECK([whether to enable Realtime GPS Tracking stuff], | |
282 | [ac_cv_enable_realtimegpstracking], [ac_cv_enable_realtimegpstracking=yes]) | |
283 | case $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 | ;; |
288 | esac | |
289 | AM_CONDITIONAL([REALTIME_GPS_TRACKING], [test x$ac_cv_enable_realtimegpstracking = xyes]) | |
290 | ||
a3697549 | 291 | # BZIP2 |
b1db5b51 | 292 | AC_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]) | |
296 | AC_CACHE_CHECK([whether to enable bzip2 Support], | |
297 | [ac_cv_enable_bzip2], [ac_cv_enable_bzip2=yes]) | |
298 | case $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 | ;; | |
303 | esac | |
304 | AM_CONDITIONAL([BZIP2], [test x$ac_cv_enable_bzip2 = xyes]) | |
305 | ||
306 | # FILE MAGIC | |
307 | AC_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]) | |
311 | AC_CACHE_CHECK([whether to enable Magic Support], | |
312 | [ac_cv_enable_magic], [ac_cv_enable_magic=yes]) | |
313 | case $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 | ;; | |
318 | esac | |
319 | AM_CONDITIONAL([MAGIC], [test x$ac_cv_enable_magic = xyes]) | |
320 | ||
0fb11294 RN |
321 | # SQL for MBTiles |
322 | AC_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]) | |
326 | AC_CACHE_CHECK([whether to enable MBTiles Support], | |
327 | [ac_cv_enable_mbtiles], [ac_cv_enable_mbtiles=yes]) | |
328 | case $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 | ;; | |
333 | esac | |
334 | AM_CONDITIONAL([SQLITE], [test x$ac_cv_enable_mbtiles = xyes]) | |
335 | ||
5fa4fe86 RN |
336 | # Mapnik rendering layer |
337 | AC_ARG_ENABLE(mapnik, AC_HELP_STRING([--enable-mapnik], | |
338 | [enable Mapnik (default is enable)]), | |
339 | [ac_cv_enable_mapnik=$enableval], | |
340 | [ac_cv_enable_mapnik=yes]) | |
341 | AC_CACHE_CHECK([whether to enable Mapnik], | |
342 | [ac_cv_enable_mapnik], [ac_cv_enable_mapnik=yes]) | |
343 | case $ac_cv_enable_mapnik in | |
344 | yes) | |
345 | # C++ | |
346 | AC_LANG_CPLUSPLUS | |
347 | AC_LANG_SAVE | |
348 | AC_PROG_CXX | |
616812b7 RN |
349 | # Mapnik3 requires C++11. Viking will use C++11 as well. |
350 | CXXFLAGS="$CXXFLAGS -std=c++11" | |
5fa4fe86 RN |
351 | # Too difficult to get check working under Windows (extra dependencies needed probably Boost)- so just skip it |
352 | if test "x$ac_cv_enable_windows" = "xno"; then | |
353 | 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])]) | |
354 | fi | |
355 | AC_CHECK_LIB([mapnik], [main], [], [AC_MSG_ERROR([libmapnik is needed but not found.])]) | |
356 | AC_CHECK_LIB([stdc++], [main], [], [AC_MSG_ERROR([libstdc++ is needed but not found.])]) | |
616812b7 RN |
357 | # Required for Mapnik3 build (it's also in Mapnik2 but does not need to be specified for some reason) |
358 | # it's part of libmapnik install dependencies | |
359 | AC_CHECK_LIB([icuuc], [main], [], [AC_MSG_ERROR([libicuuc is needed but not found.])]) | |
5fa4fe86 RN |
360 | AC_LANG_RESTORE |
361 | ;; | |
362 | esac | |
363 | AM_CONDITIONAL([MAPNIK], [test x$ac_cv_enable_mapnik = xyes]) | |
a3697549 RN |
364 | ### |
365 | ||
5fa4fe86 RN |
366 | ## WORK AROUND BROKEN autoconf - see http://lists.gnu.org/archive/html/bug-automake/2002-11/msg00020.html |
367 | m4_pushdef([AC_MSG_ERROR]) | |
368 | AC_PROG_CXX | |
369 | m4_popdef([AC_MSG_ERROR]) | |
370 | ## | |
371 | ||
ba4a5e11 GB |
372 | AC_ARG_WITH(search, |
373 | [AC_HELP_STRING([--with-search], | |
374 | [specify google or geonames for searching (default is google)])], | |
375 | [case "x$withval" in | |
376 | "xgoogle") | |
377 | VIK_CONFIG_SEARCH=VIK_CONFIG_SEARCH_GOOGLE | |
378 | ;; | |
379 | "xgeonames") | |
380 | VIK_CONFIG_SEARCH=VIK_CONFIG_SEARCH_GEONAMES | |
381 | ;; | |
382 | *) | |
383 | AC_MSG_ERROR([Please, set a value for search method]) | |
384 | esac], | |
385 | [VIK_CONFIG_SEARCH=VIK_CONFIG_SEARCH_GOOGLE]) | |
386 | AC_DEFINE_UNQUOTED(VIK_CONFIG_SEARCH_GOOGLE, 1, | |
387 | [Id. for searching via GOOGLE]) | |
388 | AC_DEFINE_UNQUOTED(VIK_CONFIG_SEARCH_GEONAMES, 2, | |
389 | [Id. for searching via GEONAMES]) | |
390 | AC_DEFINE_UNQUOTED(VIK_CONFIG_SEARCH, ${VIK_CONFIG_SEARCH}, | |
391 | [Method for the search]) | |
392 | ||
393 | ||
1bc9b120 GB |
394 | AC_ARG_WITH(mapcache, |
395 | [AC_HELP_STRING([--with-mapcache], | |
e6e277a8 | 396 | [specify the size of the map cache in MB (default is 128)])], |
1bc9b120 GB |
397 | [if test "x$withval" = "xno"; then |
398 | VIK_CONFIG_MAPCACHE_SIZE=0; | |
399 | elif test "x$withval" = "xyes"; then | |
e6e277a8 | 400 | AC_MSG_ERROR([Please, set a value for size of the map cache in MB]) |
1bc9b120 GB |
401 | else |
402 | VIK_CONFIG_MAPCACHE_SIZE=${withval} | |
403 | fi], | |
e6e277a8 | 404 | [VIK_CONFIG_MAPCACHE_SIZE=128]) |
1bc9b120 GB |
405 | AC_DEFINE_UNQUOTED(VIK_CONFIG_MAPCACHE_SIZE, ${VIK_CONFIG_MAPCACHE_SIZE}, |
406 | [Size of the map cache]) | |
407 | ||
5e108809 GB |
408 | |
409 | AC_ARG_WITH(tileage, | |
410 | [AC_HELP_STRING([--with-tileage], | |
7965485d | 411 | [specify the age of a tile before checking it (default is 7 days)])], |
5e108809 GB |
412 | [if test "x$withval" = "xno"; then |
413 | VIK_CONFIG_DEFAULT_TILE_AGE=0; | |
414 | elif test "x$withval" = "xyes"; then | |
415 | AC_MSG_ERROR([Please, set a value for age of tiles]) | |
416 | else | |
417 | VIK_CONFIG_DEFAULT_TILE_AGE=${withval} | |
418 | fi], | |
7965485d | 419 | [VIK_CONFIG_DEFAULT_TILE_AGE=604800]) |
5e108809 | 420 | AC_DEFINE_UNQUOTED(VIK_CONFIG_DEFAULT_TILE_AGE, ${VIK_CONFIG_DEFAULT_TILE_AGE}, |
8276d332 | 421 | [Age of tiles before checking it (in seconds)]) |
aea7a8a3 | 422 | AC_DEFINE(HAVE_VIKING, 1, [Enable Viking specifics in otherwise reusable code]) |
5e108809 | 423 | |
e5140ce8 GB |
424 | dnl man pages processing |
425 | DB2MAN_XSL=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl | |
426 | AC_SUBST(DB2MAN_XSL) | |
427 | AC_PATH_PROG(XP,xsltproc) | |
eb6a42c9 | 428 | AM_CONDITIONAL([HAVE_XSLTPROC],[test "x$XP" != "x"]) |
ba22c385 RN |
429 | AC_CHECK_PROG([HAVE_SCROLLKEEPER],scrollkeeper-config,"yes") |
430 | AM_CONDITIONAL([GEN_MANPAGES],[test "x$XP" != "x" && test -r "$DB2MAN_XSL"] && test "${HAVE_SCROLLKEEPER}" == "yes" ) | |
e5140ce8 | 431 | |
734652bf | 432 | # Configuration |
a07e9f61 RN |
433 | AC_CONFIG_FILES([ |
434 | Makefile | |
435 | src/Makefile | |
436 | src/icons/Makefile | |
437 | po/Makefile.in | |
438 | data/Makefile | |
69e5d475 | 439 | tools/Makefile |
763f5c56 | 440 | test/Makefile |
d7603eb2 | 441 | help/Makefile |
47179fe3 | 442 | help/viking.xml |
763f5c56 RN |
443 | win32/Makefile |
444 | win32/installer/Makefile | |
445 | win32/installer/pixmaps/Makefile | |
306ab474 | 446 | win32/installer/translations/Makefile |
a07e9f61 RN |
447 | doc/Makefile |
448 | doc/reference/Makefile | |
306ab474 | 449 | doc/examples/Makefile]) |
a07e9f61 | 450 | |
af2740eb QT |
451 | AC_OUTPUT([ |
452 | viking.spec | |
453 | ]) | |
001a86db QT |
454 | |
455 | dnl Output the configuration summary | |
456 | echo "" | |
457 | echo "===========================================" | |
e817bcf6 | 458 | echo "$PACKAGE $PACKAGE_URL $VERSION" |
001a86db | 459 | echo "-------------------------------------------" |
9f58c4b4 | 460 | echo "Bing Maps : $ac_cv_enable_bing" |
55340efa | 461 | echo "Google : $ac_cv_enable_google" |
001a86db | 462 | echo "Terraserver Maps : $ac_cv_enable_terraserver" |
c21cf491 | 463 | echo "Expedia Maps : $ac_cv_enable_expedia" |
001a86db | 464 | echo "Open Street Map : $ac_cv_enable_openstreetmap" |
f7d8a3c2 | 465 | echo "BlueMarble : $ac_cv_enable_bluemarble" |
da03b29d | 466 | echo "Geonames : $ac_cv_enable_geonames" |
de63aedb | 467 | echo "Geocaches Acquire : $ac_cv_enable_geocaches" |
72bbd562 | 468 | echo "Geotag Support : $ac_cv_enable_geotag (libgexiv2=$ac_cv_lib_gexiv2_gexiv2_metadata_new libexif=$ac_cv_lib_exif_exif_loader_new)" |
001a86db QT |
469 | echo "USGS 24k DEM : $ac_cv_enable_dem24k" |
470 | echo "Realtime GPS Tracking : $ac_cv_enable_realtimegpstracking" | |
a3697549 RN |
471 | echo "bzip2 Support : $ac_cv_enable_bzip2" |
472 | echo "File Magic Support : $ac_cv_enable_magic" | |
0fb11294 | 473 | echo "MBTiles Support (SQLite3) : $ac_cv_enable_mbtiles" |
5fa4fe86 | 474 | echo "Mapnik Rendering Support (C++) : $ac_cv_enable_mapnik" |
001a86db | 475 | echo "Size of map cache (in memory) : ${VIK_CONFIG_MAPCACHE_SIZE}" |
5e108809 | 476 | echo "Age of tiles (in seconds) : ${VIK_CONFIG_DEFAULT_TILE_AGE}" |
ba22c385 RN |
477 | echo -n "Man page generation : " |
478 | AM_COND_IF([GEN_MANPAGES], [echo "yes"], [echo "no"]) | |
a07e9f61 | 479 | echo "Documentation (+HTML) : ${enable_gtk_doc} (HTML: ${enable_gtk_doc_html})" |
001a86db QT |
480 | echo "-------------------------------------------" |
481 | echo "" | |
482 | echo "Configure finished, type 'make' to build." |