Fix:map_binfile:Search cleanup
[navit-package] / configure.in
1 AC_INIT(navit, 0.2.0)
2 AC_CONFIG_MACRO_DIR([m4])
3 SOURCE_MODE=svn
4
5 AM_INIT_AUTOMAKE
6 AM_CONFIG_HEADER(config.h)
7
8 AC_SUBST(SOURCE_MODE)
9 AM_CONDITIONAL(SOURCE_MODE_SVN, [test "x${SOURCE_MODE}" = "xsvn"])
10
11 if test "x${SOURCE_MODE}" = "xsvn" ; then
12         USE_MAINTAINER_MODE=yes
13 else
14         USE_MAINTAINER_MODE=no
15 fi
16
17 AC_DEFUN([AM_MAINTAINER_MODE],
18 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
19   dnl maintainer-mode is enabled by default (reason of inclusion of this function)
20   AC_ARG_ENABLE(maintainer-mode,
21 [  --enable-maintainer-mode  enable make rules and dependencies not useful
22                           (and sometimes confusing) to the casual installer],
23       USE_MAINTAINER_MODE=$enableval)
24   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
25   AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
26   MAINT=$MAINTAINER_MODE_TRUE
27   AC_SUBST(MAINT)dnl
28 ]
29 )
30
31 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
32
33 AM_MAINTAINER_MODE
34
35
36 plugins=yes; plugins_reason=default
37 postgresql=yes; postgresql_reason=default
38 samplemap=yes; samplemap_reason=default
39 binding_dbus=yes; binding_dbus_reason=default
40 binding_python=yes; binding_python_reason=default
41 font_freetype=yes; font_freetype_reason=default
42 fontconfig=yes; fontconfig_reason=default
43 gui_gtk=no; gui_gtk_reason=default
44 gui_win32=no; gui_win32_reason=default
45 gui_internal=yes; gui_internal_reason=default
46 graphics_gd=no; graphics_gd_reason=default
47 graphics_gtk_drawing_area=no; graphics_gtk_drawing_area_reason=default
48 graphics_qt_qpainter=yes; graphics_qt_qpainter_reason=default
49 graphics_opengl=yes; graphics_opengl_reason=default
50 graphics_sdl=yes; graphics_sdl_reason=default
51 graphics_win32=no; graphics_win32_reason=default
52 speech_android=no; speech_android_reason=default
53 speech_cmdline=yes; speech_cmdline_reason=default
54 speech_espeak=no; speech_espeak_reason=default
55 speech_speech_dispatcher=yes; speech_speech_dispatcher_reason=default
56 vehicle_demo=yes; vehicle_demo_reason=default
57 vehicle_file=yes; vehicle_file_reason=default
58 vehicle_gpsd=yes; vehicle_gpsd_reason=default
59 vehicle_gpsd_dbus=no; vehicle_gpsd_dbus_reason=default
60 vehicle_gypsy=yes; vehicle_gypsy_reason=default
61 vehicle_null=no; vehicle_null_reason=default
62 vehicle_wince=no; vehicle_wince_reason=default
63 vehicle_iphone=no; vehicle_iphone_reason=default
64 vehicle_android=no; vehicle_android_reason=default
65 graphics_android=no; graphics_android_reason=default
66
67 AC_CANONICAL_HOST
68 win32=no
69 win32ce=no
70 case $host_os in
71 wince|mingw32ce|cegcc)
72         win32=yes
73         win32ce=yes
74         AC_DEFINE(HAVE_API_WIN32_BASE, 1, [Have Windows Base API])
75         AC_DEFINE(HAVE_API_WIN32_CE, 1, [Have Windows CE API])
76         gui_win32=yes; gui_win32_reason="host_os is wince"
77         graphics_win32=yes; graphics_win32_reason="host_os is wince"
78         vehicle_wince=yes; vehcile_wince_reason="host_os is wince"
79         speech_espeak=yes; speech_espeak_reason="host_os is wince"
80         support_libpng=yes
81         ;;
82 mingw32)
83         win32=yes
84         AC_DEFINE(HAVE_API_WIN32_BASE, 1, [Have Windows Base API])
85         AC_DEFINE(HAVE_API_WIN32, 1, [Have Windows API])
86         gui_win32=yes; gui_win32_reason="host_os is mingw32"
87         graphics_win32=yes; graphics_win32_reason="host_os is mingw32"
88         speech_espeak=yes; speech_espeak_reason="host_os is mingw32"
89         support_libpng=yes
90         LIBS="$LIBS -lwinmm"
91         ;;
92 linux*_android)
93         android=yes
94         AC_DEFINE(HAVE_API_ANDROID, 1, [Have Android API])
95         echo "void dl_unwind_find_exidx(void) {}" >crt0.c
96         $CC -c crt0.c
97         $AR r libg.a crt0.o
98         vehicle_android=yes; vehicle_android_reason="host_os is android"
99         graphics_android=yes; graphics_android_reason="host_os is android"
100         speech_android=yes; speech_android_reason="host_os is android"
101         MODULE_LDFLAGS="-Xcompiler -nostdlib"
102         ;;
103 esac
104 if test "x$win32" = "xyes"
105 then
106         NAVIT_CFLAGS="$NAVIT_CFLAGS -I\$(top_srcdir)/navit/support/win32"
107         NAVIT_LIBS="$NAVIT_LIBS -L\$(top_builddir)/navit/support/win32 -lsupport_win32"
108 fi
109
110
111 AM_CONDITIONAL(SUPPORT_WIN32, [test "x$win32" = "xyes"])
112 AM_CONDITIONAL(SUPPORT_WIN32CE, [test "x$win32ce" = "xyes"])
113 AM_CONDITIONAL(SUPPORT_ANDROID, [test "x$android" = "xyes"])
114
115 if test "x$support_libpng" = "xyes"
116 then
117         NAVIT_CFLAGS="$NAVIT_CFLAGS -I\$(top_srcdir)/navit/support/libpng"
118         NAVIT_LIBS="$NAVIT_LIBS -L\$(top_builddir)/navit/support/libpng -lsupport_libpng"
119 fi
120 AM_CONDITIONAL(SUPPORT_LIBPNG, [test "x$support_libpng" = "xyes"])
121
122 AC_SUBST(MODULE_LDFLAGS)
123
124 LIBS="$LIBS -lm"
125 if test "$win32" == "no"; then
126         LIBS="$LIBS -rdynamic"
127 fi
128
129 m4_ifndef([AC_USE_SYSTEM_EXTENSIONS],
130         [AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], [AC_GNU_SOURCE])])
131
132 AC_USE_SYSTEM_EXTENSIONS
133
134 AC_PROG_OBJC
135 AC_PROG_CC
136 AC_PROG_OBJC
137 if eval "test x`uname` = xDarwin"; then
138         CFLAGS="$CFLAGS -I/opt/local/include -L/opt/local/lib"
139 fi
140 if eval "test x$GCC = xyes"; then
141         CFLAGS="$CFLAGS -Wall -Wcast-align -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wreturn-type -D_GNU_SOURCE"
142 fi
143 AM_PROG_CC_C_O
144
145 AC_PROG_CXX
146 if eval "test x$GXX = xyes"; then
147         CXXFLAGS="$CXXFLAGS -Wall -Wcast-align -Wpointer-arith -Wreturn-type -D_GNU_SOURCE"
148 fi
149
150 PKG_CHECK_EXISTS
151 if test "x${cross_compiling}" = "xyes"; then
152         samplemap="no";samplemap_reason="not supported for cross compiling"
153         binding_python="no";binding_python_reason="not supported for cross compiling"
154         postgresql="no";postgresql_reason="not supported for cross compiling"
155         AC_MSG_CHECKING([for a C compiler for build tools])
156         AC_CHECK_PROGS(CC_FOR_BUILD, gcc cc)
157 else
158         CC_FOR_BUILD=$CC
159 fi
160 CCLD_FOR_BUILD="$CC_FOR_BUILD"
161 AC_SUBST(cross_compiling)
162 AC_SUBST(CC_FOR_BUILD)
163 AC_SUBST(CCLD_FOR_BUILD)
164
165 # Endianness
166 # defines WORDS_BIGENDIAN for big-endian systems
167 AC_C_BIGENDIAN
168
169 AC_ARG_ENABLE(variant, [  --enable-variant=something          set variant], NAVIT_VARIANT=$enableval)
170 AC_SUBST(NAVIT_VARIANT)
171
172 AC_ARG_ENABLE(cache-size, [  --enable-cache-size=size in bytes        set cache size], AC_DEFINE_UNQUOTED(CACHE_SIZE,[${enableval}], [Size of Cache in Bytes]))
173
174 AC_ARG_ENABLE(avoid-unaligned, [  --enable-avoid-unaligned          avoid unaligned accesses], AVOID_UNALIGNED=$enableval, AVOID_UNALIGNED=no)
175 test x"${AVOID_UNALIGNED}" = xyes && AC_DEFINE(AVOID_UNALIGNED,[],Define to avoid unaligned access)
176
177 AC_ARG_ENABLE(avoid-float, [  --enable-avoid-float              avoid floating point calculations], AVOID_FLOAT=$enableval, AVOID_FLOAT=no)
178 test x"${AVOID_FLOAT}" = xyes && AC_DEFINE(AVOID_FLOAT,[],Define to avoid floating point)
179
180 AC_ARG_ENABLE(transformation-roll, [  --enable-transformation-roll      add support for specifying roll angle in transformation], ENABLE_ROLL=$enableval, ENABLE_ROLL=no)
181 test x"${ENABLE_ROLL}" = xyes && AC_DEFINE(ENABLE_ROLL,[],Define to add support for specifying roll angle in transformation)
182
183 AC_ARG_ENABLE(hildon, [  --disable-hildon              build without maemo/hildon support], enable_hildon=$enableval, enable_hildon=yes)
184 if test "x${enable_hildon}" = "xyes" ; then
185         PKG_CHECK_MODULES(HILDON, hildon-1 >= 0.9.9, , [
186                 AC_MSG_RESULT(no)
187                 enable_hildon=no
188         ])
189         PKG_CHECK_MODULES(GPSBT, gpsbt, [
190                 AC_DEFINE(HAVE_GPSBT, 1, [Have the gpsbt library])
191                 AC_SUBST(GPSBT_CFLAGS)
192                 AC_SUBST(GPSBT_LIBS)
193                 ], [
194                 AC_MSG_RESULT(no)
195         ])
196         if test x"${enable_hildon}" = xyes ; then
197                 AC_DEFINE(USE_HILDON, 1, [Build with maemo/hildon support])
198                 AC_SUBST(HILDON_CFLAGS)
199                 AC_SUBST(HILDON_LIBS)
200         fi
201 fi
202 AM_CONDITIONAL(USE_HILDON, test "${enable_hildon}" = "xyes")
203
204 AC_ARG_ENABLE(garmin, [  --disable-garmin             disable garmin support], USE_GARMIN=$enableval, USE_GARMIN=yes)
205
206 # samplemap
207 AC_PATH_PROG(_PATH_BZCAT,[bzcat])
208 if test "x${_PATH_BZCAT}" = "x" ; then
209         samplemap=no; samplemap_reason="bzcat missing"
210 fi
211 AC_ARG_ENABLE(samplemap, [  --disable-samplemap             don't build the samplemap], samplemap=$enableval;samplemap_reason="configure parameter")
212 AM_CONDITIONAL(BUILD_SAMPLEMAP, [test "x$samplemap" = "xyes"])
213
214 AC_ARG_ENABLE(fastmath, [  --disable-fastmath             don't build with fastmath], fastmath=$enableval, fastmath=yes)
215 AM_CONDITIONAL(FASTMATH, [test "x$fastmath" = "xyes"])
216
217 if test x"$fastmath" = xyes; then
218         if eval "test x$GCC = xyes"; then
219                 CFLAGS="$CFLAGS -ffast-math"
220         fi
221 fi
222
223 X_CFLAGS="-I$x_includes"
224 AS_IF([test -n "$ac_x_libraries"], [X_LIBS="-L$ac_x_libraries"])
225
226 # glib
227 AC_ARG_ENABLE(glib, [  --disable-glib             don't build with external glib], glib=$enableval, glib=yes)
228 if test x"${glib}" = "xyes"; then
229         PKG_CHECK_MODULES(GLIB, [glib-2.0 gthread-2.0], [glib=yes],[glib=no])
230 fi
231 if test "x${glib}" = "xyes"; then
232         AC_DEFINE(HAVE_GLIB, 1, [Define to 1 if you have (external) glib library])
233 else
234         GLIB_CFLAGS="-I\$(top_srcdir)/navit/support -I\$(top_srcdir)/navit/support/glib -I\$(top_srcdir)/navit/support/ezxml"
235         GLIB_LIBS="-L\$(top_builddir)/navit/support/glib -lsupport_glib -L\$(top_builddir)/navit/support/ezxml -lsupport_ezxml"
236 fi
237
238 # gmodule
239 AC_ARG_ENABLE(gmodule, [  --disable-gmodule             don't build with gmodule], gmodule=$enableval, gmodule=yes)
240 if test x"${gmodule}" = "xyes"; then
241         PKG_CHECK_MODULES(GMODULE, [gmodule-2.0], [gmodule=yes], [gmodule=no])
242 fi
243 if test "x${gmodule}" = "xyes"; then
244         AC_DEFINE(HAVE_GMODULE, 1, [Define to 1 if you have gmodule])
245 else
246         AC_CHECK_LIB(dl, dlopen,
247                 [plugins_reason="default, via dlopen";GMODULE_LIBS="-ldl";AC_DEFINE(HAVE_DLOPEN, 1, [Define to 1 if you have dlopen])],          
248                 [plugins="no"; plugins_reason="package gmodule and dlopen missing"]
249         )
250 fi
251 # plugins
252 AC_ARG_ENABLE(plugins,  [  --disable-plugins          disable plugins], [ plugins=$enableval;plugin_reason="configure parameter" ])
253 if test "x${plugins}" = "xyes"; then
254         AC_ENABLE_SHARED
255         AC_DISABLE_STATIC
256         AC_DEFINE(
257                 [USE_PLUGINS],
258                 [],
259                 Define to 1 if you have plugins.
260         )
261 else
262         AC_DISABLE_SHARED
263         AC_ENABLE_STATIC
264 fi
265 AM_CONDITIONAL(PLUGINS, [test "x$plugins" = "xyes"])
266 AC_PROG_LIBTOOL
267
268 AM_CONDITIONAL(EVENT_GLIB, [test "x$glib" = "xyes"])
269 AM_CONDITIONAL(SUPPORT_GLIB, [test "x$glib" = "xno"])
270 AM_CONDITIONAL(SUPPORT_EZXML, [test "x$glib" = "xno"])
271 AM_CONDITIONAL(MAP_POI_GEODOWNLOAD, [test "x$glib" = "xyes"])
272
273 AC_CHECK_HEADER(
274         zlib.h,
275         AC_DEFINE(
276                 [HAVE_ZLIB],
277                 [],
278                 Define to 1 if you have the <zlib.h> header file.
279         )
280         ZLIB_LIBS="-lz"
281         zlib=yes,
282         ZLIB_CFLAGS="-I\$(top_srcdir)/navit/support/zlib"
283         ZLIB_LIBS="-L\$(top_builddir)/navit/support/zlib -lsupport_zlib"
284         zlib=no
285 )
286 AM_CONDITIONAL(SUPPORT_ZLIB, [test "x$zlib" = "xno"])
287 AC_SUBST(ZLIB_CFLAGS)
288 AC_SUBST(ZLIB_LIBS)
289
290 # gtk
291 PKG_CHECK_MODULES(GTK2, [gtk+-2.0], [gtk2_pkgconfig=yes], [gtk2_pkgconfig=no])
292 if test "x$gtk2_pkgconfig" = "xyes"; then
293         AC_DEFINE(HAVE_GTK2, 1, [Define to 1 if you have gtk2])
294         graphics_gtk_drawing_area=yes; graphics_gtk_drawing_area_reason="gtk+-2.0 present"
295         gui_gtk=yes; gui_gtk_reason="gtk+-2.0 present"
296 fi
297
298 # fsync
299 AC_MSG_CHECKING(for fsync)
300 AC_TRY_LINK([#include <unistd.h>], [fsync(0);],AC_MSG_RESULT(yes);AC_DEFINE(HAVE_FSYNC, 1, [Define to 1 if you have the `fsync' function.]),AC_MSG_RESULT(no))
301
302 # system
303 AC_MSG_CHECKING(for system)
304 AC_TRY_LINK([#include <stdlib.h>], [system("/bin/true");],AC_MSG_RESULT(yes);AC_DEFINE(HAVE_SYSTEM, 1, [Define to 1 if you have the `system' function.]),speech_cmdline=no; speech_cmdline_reason="not supported without system()"; AC_MSG_RESULT(no))
305
306 AC_MSG_CHECKING(for CreateProcess)
307 AC_TRY_LINK([#include <windows.h>], [CreateProcess(NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL);],AC_MSG_RESULT(yes);AC_DEFINE(HAVE_CREATEPROCESS, 1, [Define to 1 if you have the `CreateProcess' function.]) speech_cmdline=yes; speech_cmdline_reason="CreateProcess exists", AC_MSG_RESULT(no))
308
309 AC_ARG_ENABLE(graphics-sdl, [  --disable-graphics-sdl             don't create graphics sdl], graphics_sdl=$enableval;graphics_sdl_reason="configure parameter")
310
311 if test "x${graphics_sdl}" = "xyes" ; then
312         PKG_CHECK_MODULES(SDL, 
313                           [sdl], 
314                           [graphics_sdl="yes"
315                            graphics_sdl_reason="sdl present"] , 
316                           [graphics_sdl="no"
317                            graphics_sdl_reason="sdl not available"]
318                          )
319         AC_SUBST(SDL_CFLAGS)
320         AC_SUBST(SDL_LIBS)
321 fi
322 if test "x${graphics_sdl}" = "xyes" ; then
323         save_CPPFLAGS=$CPPFLAGS
324         CPPFLAGS="$SDL_CFLAGS $CPPFLAGS"
325         AC_CHECK_HEADER(SDL_image.h,SDL_IMAGE_LIBS=-lSDL_image,graphics_sdl="no";graphics_sdl_reason="SDL_image.h missing")
326         AC_SUBST(SDL_IMAGE_LIBS)
327         CPPFLAGS=$save_CPPFLAGS
328 fi
329 if test "x${graphics_sdl}" = "xyes" ; then
330         AC_DEFINE(USE_GRAPHICS_SDL, 1, [Build with graphics sdl])
331 fi
332 AM_CONDITIONAL(USE_GRAPHICS_SDL, test "x${graphics_sdl}" = "xyes")
333
334 AC_ARG_ENABLE(postgresql, [  --disable-postgresql             don't add postgresql support to osm2navit], postgresql=$enableval;postgresql_reason="configure parameter")
335 if test "x${postgresql}" = "xyes" ; then
336         if test -z "$PG_CONFIG"; then
337             AC_PATH_PROG([PG_CONFIG], [pg_config], [])
338         fi
339         AC_MSG_CHECKING([for PostgreSQL libraries with $PG_CONFIG])
340         if test ! -x "$PG_CONFIG"; then
341             if test "x${PG_CONFIG}" = "x" ; then
342                  postgresql_reason="$PG_CONFIG not executable"
343             else
344                  postgresql_reason="pg_config missing"
345             fi
346             postgresql=no 
347             AC_MSG_RESULT([no])
348         else
349             POSTGRESQL_CFLAGS="-I`$PG_CONFIG --includedir`"
350             POSTGRESQL_LIBS="-L`$PG_CONFIG --libdir` -lpq"
351             AC_DEFINE(HAVE_POSTGRESQL, 1, [Postgresql libraries available])
352             AC_SUBST(POSTGRESQL_CFLAGS)
353             AC_SUBST(POSTGRESQL_LIBS)
354             AC_MSG_RESULT([yes])
355         fi 
356 fi
357 AM_CONDITIONAL(HAVE_POSTGRESQL, test "x${postgresql}" = "xyes")
358 # font
359 # freetype
360 AC_ARG_ENABLE(font-freetype, [  --disable-font-freetype             don't add freetype support], font_freetype=$enableval;font_freetype_reason="configure parameter")
361 if test "x${font_freetype}" = "xyes" -a "x${FREETYPE2_CFLAGS}" = "x" -a "x${FREETYPE2_LIBS}" = "x"; then
362         PKG_CHECK_MODULES(FREETYPE2, [freetype2], , [font_freetype=no;font_freetype_reason="Package freetype2 missing"])
363 fi
364 AC_SUBST(FREETYPE2_CFLAGS)
365 AC_SUBST(FREETYPE2_LIBS)
366 AM_CONDITIONAL(FONT_FREETYPE, test "x${font_freetype}" = "xyes")
367
368 AC_ARG_ENABLE(fontconfig, [  --disable-fontconfig             don't add fontconfig support], fontconfig=$enableval;fontconfig_reason="configure parameter")
369 if test "x${fontconfig}" = "xyes"; then
370         PKG_CHECK_MODULES(FONTCONFIG, [fontconfig], [fontconfig=yes], [fontconfig=no])
371 fi
372 if test "x$fontconfig" = "xyes"; then
373    AC_DEFINE(HAVE_FONTCONFIG, 1, [Define to 1 if you have fontconfig])
374 fi
375 AC_SUBST(FONTCONFIG_CFLAGS)
376 AC_SUBST(FONTCONFIG_LIBS)
377
378 AM_CONDITIONAL(FONTS, test "x${font_freetype}" = "xyes" -a "x$fontconfig" != "xyes")
379
380 PKG_CHECK_MODULES(IMLIB2, [imlib2], [imlib2_pkgconfig=yes], [imlib2_pkgconfig=no])
381 if test "x$imlib2_pkgconfig" = "xyes"; then
382    AC_DEFINE(HAVE_IMLIB2, 1, [Define to 1 if you have imlib2])
383 fi
384 AC_SUBST(IMLIB2_CFLAGS)
385 AC_SUBST(IMLIB2_LIBS)
386
387
388
389 AC_ARG_ENABLE(gui-sdl, [  --disable-gui-sdl             don't create gui sdl ], MODULE_GUI_SDL=$enableval, MODULE_GUI_SDL=yes)
390 if test "x$MODULE_GUI_SDL" = "xyes"; then
391         AC_CHECK_HEADER(
392                 SDL/SDL.h,
393                 AC_DEFINE(
394                         [HAVE_LIBSDL],
395                         [],
396                         Define to 1 if you have the <SDL/SDL.h> header file.
397                         )
398                         SDL_LIBS="-lSDL"
399                         sdl=yes,
400                 AC_MSG_WARN([*** no SDL/SDL.h -- SDL support disabled])
401         )
402 fi
403
404 AC_CHECK_HEADER(
405         X11/Xmu/Xmu.h,
406         AC_DEFINE(
407                 [HAVE_XMU],
408                 [],
409                 Define to 1 if you have the <X11/Xmu/Xmu.h> header file.
410                 )
411                 xmu=yes,
412         AC_MSG_WARN([*** no X11/Xmu/Xmu.h -- opengl and SDL support disabled])
413 )
414
415 AC_ARG_ENABLE(graphics-opengl, [  --disable-graphics-opengl      disable graphics type OpenGL], graphics_opengl=$enableval;graphics_opengl_reason="configure parameter")
416 if test "x${graphics_opengl}" = "xyes" ; then
417
418 AC_CHECK_HEADER(
419         GL/gl.h,
420         AC_DEFINE(
421                 [HAVE_OPENGL],
422                 [],
423                 Define to 1 if you have the <GL/gl.h> header file.
424                 )
425                 OPENGL_LIBS="$X_LIBS -lGL -lGLU"
426                 opengl=yes,
427         AC_MSG_WARN([*** no GL/gl.h -- opengl and SDL support disabled];graphics_opengl=no;graphics_opengl_reason="Headers missing")
428 )
429
430 AC_CHECK_HEADER(
431         GL/glut.h,
432         AC_DEFINE(
433                 [HAVE_GLUT],
434                 [],
435                 Define to 1 if you have the <GL/glut.h> header file.
436                 )
437                 glut=yes,
438         AC_MSG_WARN([*** no GL/glut.h -- opengl and SDL support disabled]);graphics_opengl=no;graphics_opengl_reason="Headers missing"
439 )
440
441 AC_SUBST(OPENGL_CFLAGS)
442 AC_SUBST(OPENGL_LIBS)
443
444 AC_CHECK_HEADER(
445         GL/glc.h,
446         AC_DEFINE(
447                 [HAVE_GLC],
448                 [],
449                 Define to 1 if you have the <GL/glc.h> header file.
450                 )
451                 GLC_LIBS="-lGLC"
452                 glc=yes,
453         AC_MSG_WARN([*** no GL/glc.h -- opengl and SDL support disabled])
454 )
455 AC_SUBST(GLC_CFLAGS)
456 AC_SUBST(GLC_LIBS)
457 fi
458
459 AM_CONDITIONAL(GUI_SDL, [test "x$sdl" = "xyes" -a "x$opengl" = "xyes" -a "x$glc" = "xyes" -a "x$xmu" = "xyes" ])
460 AM_CONDITIONAL(GRAPHICS_OPENGL, [test "x$glut" = "xyes" -a "x$opengl" = "xyes" -a "x$glc" = "xyes" ])
461
462
463 if test x"${USE_GARMIN}" = xyes
464 then
465         # check for libgarmin
466         PKG_CHECK_MODULES(LIBGARMIN, libgarmin, use_libgarmin=yes, use_libgarmin=no)
467         AC_SUBST(LIBGARMIN_CFLAGS)
468         AC_SUBST(LIBGARMIN_LIBS)
469 fi
470         AM_CONDITIONAL(HAVELIBGARMIN, [test "x$use_libgarmin" = "xyes"])
471
472 ## binding
473 # python
474 AC_ARG_ENABLE(binding-python, [  --disable-binding-python             don't create binding python], binding_python=$enableval;binding_python_reason="configure parameter")
475 if test "x${binding_python}" = "xyes"; then
476         AC_PATH_PROG(_PATH_PYTHON,[python])
477         dnl Libraries and flags for embedded Python.
478         dnl FIXME: I wish there was a less icky way to get this.
479         if test "x${_PATH_PYTHON}" != "x" ; then
480                 AC_MSG_CHECKING(for Python linkage)
481                 AC_PATH_PROG([PYTHONCONFIG], [python-config], [])
482                 if test "x${PYTHONCONFIG}" = "x" ; then
483                         py_prefix=`$_PATH_PYTHON -c 'import sys; print sys.prefix'`
484                         py_ver=`$_PATH_PYTHON -c 'import sys; print sys.version[[:3]]'`
485                         py_lib=`$_PATH_PYTHON -c 'import sys; print sys.lib'`
486                         py_libdir="${py_prefix}/${py_lib}/python${py_ver}"
487                         PYTHON_CFLAGS="-I${py_prefix}/include/python${py_ver}"
488                         if test -f $py_libdir/config/Makefile -a -f $py_prefix/include/python${py_ver}/Python.h; then
489                                 py_libs=`grep '^LIBS=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
490                                 py_libc=`grep '^LIBC=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
491                                 py_libm=`grep '^LIBM=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
492                                 py_liblocalmod=`grep '^LOCALMODLIBS=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
493                                 py_libbasemod=`grep '^BASEMODLIBS=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
494                                 PYTHON_LIBS="-L$py_libdir/config $py_libs $py_libc $py_libm -lpython$py_ver $py_liblocalmod $py_libbasemod"
495                                 PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/[ \\t]*/ /g'`
496                                 AC_MSG_RESULT($py_libdir)
497                         else
498                                 binding_python="no"
499                                 binding_python_reason="$py_libdir/config/Makefile or $py_prefix/include/python${py_ver}/Python.h missing"
500                         fi
501
502                 else
503                         PYTHON_CFLAGS="`${PYTHONCONFIG} --cflags`"
504                         PYTHON_LIBS="`${PYTHONCONFIG} --ldflags`"
505                 fi
506         else
507                 binding_python="no"
508                 binding_python_reason="python executable missing"
509         fi
510 fi
511 if test "x${binding_python}" = xyes ; then
512         AC_DEFINE(USE_BINDING_PYTHON, 1, [Build with binding python])
513 fi
514 AC_SUBST(PYTHON_CFLAGS)
515 AC_SUBST(PYTHON_LIBS)
516 AM_CONDITIONAL(BINDING_PYTHON, test "x${binding_python}" = "xyes")
517
518 # dbus
519 AC_ARG_ENABLE(binding-dbus,   [  --disable-binding-dbus               don't create binding dbus], binding_dbus=$enableval;binding_dbus_reason="configure parameter")
520 if test "x${binding_dbus}" = "xyes" ; then
521         PKG_CHECK_MODULES(DBUS, [dbus-glib-1], ,binding_dbus=no)
522 fi
523 if test "x${binding_dbus}" = "xyes" ; then
524         AC_DEFINE(USE_BINDING_DBUS, 1, [Build with binding dbus])
525         vehicle_gpsd_dbus="yes"
526         vehicle_gpsd_dbus_reason="dbus binding present"
527 fi
528 AC_SUBST(DBUS_CFLAGS)
529 AC_SUBST(DBUS_LIBS)
530 AM_CONDITIONAL(BINDING_DBUS, test "x${binding_dbus}" = "xyes")
531 AM_CONDITIONAL(VEHICLE_GPSD_DBUS, test "x${vehicle_gpsd_dbus}" = "xyes")
532 AC_ARG_WITH(dbus-service-dir, [ --with-dbus-service-dir   specify where the dbus service dir resides], DBUS_SERVICE_DIR=$withval, DBUS_SERVICE_DIR="$datarootdir/dbus-1/services")
533 AC_SUBST(DBUS_SERVICE_DIR)
534
535 # svg
536 AC_ARG_ENABLE(svg, [  --disable-svg        disable Scalable Vector Graphics], enable_svg=$enableval, enable_svg=yes)
537 AC_ARG_ENABLE(svg2png, [  --disable-svg2png        disable conversion of svgs to pngs], enable_svg2png=$enableval, enable_svg2png=yes)
538 AC_ARG_ENABLE(svg2png-scaling, [  --enable-svg2png-scaling   enable conversion of svgs to pngs with specified sizes], SVG2PNG_SCALES=$enableval, SVG2PNG_SCALES="8 16 32 48 96")
539 AC_ARG_ENABLE(svg2png-scaling-flag, [  --enable-svg2png-scaling-flag   enable conversion of flag svgs to pngs with specified sizes], SVG2PNG_SCALES_FLAG=$enableval, SVG2PNG_SCALES_FLAG="8 16 32 48 96")
540 AC_ARG_ENABLE(svg2png-scaling-nav, [  --enable-svg2png-scaling-nav   enable conversion of nav svgs to pngs with specified sizes], SVG2PNG_SCALES_NAV=$enableval, SVG2PNG_SCALES_NAV="8 16 32 48 96")
541 AC_ARG_WITH(svg2png-use-convert, [  --with-svg2png-use-convert   use imagemagick's convert for png creation], SVG2PNG_CONVERTER="convert")
542 AC_ARG_WITH(svg2png-use-rsvg-convert, [  --with-svg2png-use-rsvg-convert   use librsvg's rsvg-convert for png creation], SVG2PNG_CONVERTER="rsvg-convert")
543 AC_ARG_WITH(svg2png-use-inkscape, [  --with-svg2png-use-inkscape   use inkscapes internal convert routines for png creation], SVG2PNG_CONVERTER="inkscape")
544 AC_ARG_WITH(svg2png-use-ksvgtopng4, [  --with-svg2png-use-ksvgtopng4   use kde4's ksvgtopng4 for png creation], SVG2PNG_CONVERTER="ksvgtopng4")
545 AC_ARG_WITH(svg2png-use-ksvgtopng, [  --with-svg2png-use-ksvgtopng   use kde3's convert for png creation], SVG2PNG_CONVERTER="ksvgtopng")
546 if test "x${enable_svg2png}" = "xyes" ; then
547     if test "x${SVG2PNG_CONVERTER}" = "x"; then
548         SVG2PNG_CONVERTER="rsvg-convert ksvgtopng ksvgtopng4 inkscape convert"
549     fi
550     AC_PATH_PROGS([SVG2PNG], ${SVG2PNG_CONVERTER}, [none])
551     if test "x${SVG2PNG}" = "xnone"; then
552         enable_svg2png="no"
553     fi
554 fi
555 AC_SUBST(SVG2PNG)
556 AC_SUBST(SVG2PNG_SCALES)
557 AC_SUBST(SVG2PNG_SCALES_FLAG)
558 AC_SUBST(SVG2PNG_SCALES_NAV)
559 AM_CONDITIONAL(USE_SVG2PNG_SCALES, test "x${SVG2PNG_SCALES}" != "xyes" -a "x${SVG2PNG_SCALES}" != "x")
560 AM_CONDITIONAL(USE_SVG2PNG_SCALES_FLAG, test "x${SVG2PNG_SCALES_FLAG}" != "xyes" -a "x${SVG2PNG_SCALES_FLAG}" != "x")
561 AM_CONDITIONAL(USE_SVG2PNG_SCALES_NAV, test "x${SVG2PNG_SCALES_NAV}" != "xyes" -a "x${SVG2PNG_SCALES_NAV}" != "x")
562 AM_CONDITIONAL(USE_SVG2PNG, test "x${enable_svg2png}" = "xyes")
563 AM_CONDITIONAL(USE_SVG, test "x${enable_svg}" = "xyes")
564
565 # XSLTS
566 AC_ARG_WITH(xslts, [  --with-xslts   enable processing of navit.xml with given xslt scripts], XSLTS=$withval, XSLTS="")
567 AC_SUBST(XSLTS)
568 AC_ARG_WITH(saxon, [ --with-saxon   specify the saxon xslt processor], SAXON=$withval, SAXON="saxon")
569 AC_SUBST(SAXON)
570
571 # Android Permissions
572 AC_ARG_WITH(android-permissions, [  --with-android-permissions   Set additional android permissions], ANDROID_PERMISSIONS=$withval, ANDROID_PERMISSIONS="")
573 AC_SUBST(ANDROID_PERMISSIONS)
574
575 # NLS
576
577 AC_ARG_ENABLE(nls,
578   [  --disable-nls        disable Native Language Support ( gettext/libintl )],
579    enable_nls=$enableval, enable_nls=yes)
580
581
582 INTLIBS=""
583 MOFILES=""
584 POFILES=""
585 POIFILES=""
586 LINGUAS=""
587
588 if test "x$enable_nls" = "xyes"; then
589
590   AC_CHECK_FUNC(gettext, [HAVEGETTEXT="yes"],[INTLIBS="-lintl" HAVEGETTEXT="yes"])
591   AC_CHECK_PROG(XGETTEXT, xgettext, xgettext)
592   AC_CHECK_PROG(MSGMERGE, msgmerge, msgmerge)
593   AC_CHECK_PROG(MSGFMT, msgfmt, msgfmt)
594
595   if test "$XGETTEXT" != ""; then 
596     if $XGETTEXT --help 2>&1 | grep illegal >/dev/null ; then
597         echo "xgettext isn't GNU version"
598         XGETTEXT=""
599     fi
600   fi
601
602   if test "$XGETTEXT" != "" ; then
603      PO=""
604      if test "$LINGUAS" = ""; then
605            ling=` (cd $srcdir/po; /bin/ls *.po.in) `
606            for l in $ling; do
607                 lcode=`basename $l .po.in`
608                 LINGUAS="$LINGUAS$lcode "
609            done
610     fi
611     AC_DEFINE(ENABLE_NLS, [1], [NLS Please])
612     echo "xgettext and gettext() exist; will build i18n support for $LINGUAS"
613   else
614    LINGUAS=""
615    PO=""
616    echo "xgettext doesn't exist; will not build i18n support"
617    enable_nls=no
618  fi
619  for lang in $LINGUAS; do
620     MOFILES="$MOFILES $lang.mo"
621  done
622  for lang in $LINGUAS; do
623     POFILES="$POFILES $lang.po"
624  done
625  for lang in $LINGUAS; do
626     POIFILES="$POIFILES $lang.po.in"
627  done
628
629 AC_SUBST(INTLIBS)
630 AC_SUBST(MOFILES)
631 AC_SUBST(POFILES)
632 AC_SUBST(POIFILES)
633 AM_GNU_GETTEXT_VERSION
634 AM_GNU_GETTEXT(no-libtool, need-ngettext, \$(top_builddir)/intl/)
635 AC_SUBST(LIBINTL)
636 AC_SUBST(LTLIBINTL)
637 if test x"$LIBINTL" != "x" ;then
638         CFLAGS="$CFLAGS -I\$(top_builddir)/intl/"
639 fi
640
641 fi
642 AM_CONDITIONAL(ENABLE_NLS, [test "x$enable_nls" = "xyes"])
643 AC_CHECK_HEADER(
644         byteswap.h,
645         AC_DEFINE(
646                 [HAVE_BYTESWAP_H],
647                 [1],
648                 [Define to 1 if you have byteswap.h],
649                 )
650                 ,
651 )
652
653 PACKAGE=navit
654 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
655 AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
656 AC_SUBST(PACKAGE)
657 AC_SUBST(VERSION)
658
659 AC_CHECK_HEADER(wordexp.h,wordexp_h=yes,wordexp_h=no;NAVIT_CFLAGS="$NAVIT_CFLAGS -I\$(top_srcdir)/navit/support/wordexp";WORDEXP_LIBS="-L\$(top_builddir)/navit/support/wordexp -lsupport_wordexp")
660 AM_CONDITIONAL(SUPPORT_WORDEXP, [test "x$wordexp_h" = "xno"])
661
662 support_libc=no
663 AC_ARG_ENABLE(support_libc, [  --enable-support-libc enable builtin mini libc ], support_libc=$enableval)
664 AM_CONDITIONAL(SUPPORT_LIBC, [test "x$support_libc" = "xyes"])
665 if test "x$support_libc" = "xyes"; then
666         CFLAGS="$CFLAGS -I\$(top_srcdir)/navit/support/libc"
667         LIBC_LIBS="-L\$(top_builddir)/navit/support/libc -lsupport_libc"
668 fi
669
670 ## graphics
671 # android
672 AC_ARG_ENABLE(graphics-android, [  --disable-graphics-android            disable graphics type android], graphics_android=$enableval;graphics_android_reason="configure parameter")
673 AM_CONDITIONAL(GRAPHICS_ANDROID, test "x${graphics_android}" = "xyes")
674 # gd
675 AC_ARG_ENABLE(graphics-gd, [  --enable-graphics-gd                enable graphics type gd], graphics_gd=$enableval;graphics_gd_reason="configure parameter")
676 if test "x${graphics_gd}" = "xyes" ; then
677         if test -z "$GDLIB_CONFIG"; then
678             AC_PATH_PROG([GDLIB_CONFIG], [gdlib-config], [])
679         fi
680         AC_MSG_CHECKING([for gdlib with $GDLIB_CONFIG])
681         if test ! -x "$GDLIB_CONFIG"; then
682             if test "x${GDLIB_CONFIG}" = "x" ; then
683                  graphics_gd_reason="$GDLIB_CONFIG not executable"
684             else
685                  graphics_gd_reason="gdlib-config missing"
686             fi
687             graphics_gd=no 
688             AC_MSG_RESULT([no])
689         else
690             GD_CFLAGS="-I`$GDLIB_CONFIG --includedir`"
691             GD_LIBS="-L`$GDLIB_CONFIG --libdir` -lgd `$GDLIB_CONFIG --libs`"
692             AC_SUBST(GD_CFLAGS)
693             AC_SUBST(GD_LIBS)
694             AC_MSG_RESULT([yes])
695         fi 
696 fi
697 AM_CONDITIONAL(GRAPHICS_GD, test "x${graphics_gd}" = "xyes")
698 # gtk_drawing_area
699 AC_ARG_ENABLE(graphics-gtk-drawing-area, [  --disable-graphics-gtk-drawing-area disable graphics type gtk_drawing_area], graphics_gtk_drawing_area=$enableval;graphics_gtk_drawing_area_reason="configure parameter")
700 AM_CONDITIONAL(GRAPHICS_GTK_DRAWING_AREA, [test "x${graphics_gtk_drawing_area}" = "xyes"])
701 # win32
702 AC_ARG_ENABLE(graphics-win32, [  --disable-graphics-win32            disable graphics type win32], graphics_win32=$enableval;graphics_win32_reason="configure parameter")
703 AM_CONDITIONAL(GRAPHICS_WIN32, test "x${graphics_win32}" = "xyes")
704 # qt_qpainter
705 AC_ARG_ENABLE(graphics-qt-qpainter, [  --disable-graphics-qt-qpainter      disable graphics type qt-qpainter], graphics_qt_qpainter=$enableval;graphics_qt_qpainter_reason="configure parameter")
706 if test "x${graphics_qt_qpainter}" = "xyes" -a "x${QT_GUI_CFLAGS}" = "x" -a "x${QT_GUI_LIBS}" = "x"; then
707         PKG_CHECK_MODULES(QT_GUI, [QtGui QtCore], ,graphics_qt_qpainter=no,graphics_qt_qpainter_reason="Packages QtGui and/or QtCore missing")
708         if test "x${graphics_qt_qpainter}" = "xno"; then
709                 PKG_CHECK_MODULES(QT_GUI, [qt-mt],graphics_qt_qpainter=yes,graphics_qt_qpainter_reason="Package qt-mt present")
710         fi
711 fi
712 if test "x${graphics_qt_qpainter}" = "xyes" ; then
713         AC_DEFINE(USE_GRAPICS_QT_QPAINTER, 1, [Build with graphics qt_qpainter])
714         MOC=`$PKG_CONFIG QtGui --variable=moc_location`
715         if test "x${MOC}" = "x"; then
716                 AC_CHECK_PROG(MOC, moc, moc)
717         fi
718         AC_SUBST(MOC)
719 fi
720 AC_SUBST(QT_GUI_CFLAGS)
721 AC_SUBST(QT_GUI_LIBS)
722 AM_CONDITIONAL(GRAPHICS_QT_QPAINTER, test "x${graphics_qt_qpainter}" = "xyes")
723
724 ## gui
725 # gtk
726 AC_ARG_ENABLE(gui-gtk, [  --disable-gui-gtk                   disable gui type gtk ], gui_gtk=$enableval)
727 AM_CONDITIONAL(GUI_GTK, [test "x${gui_gtk}" = "xyes"])
728 # internal
729 AC_ARG_ENABLE(gui-internal, [  --disable-gui-internal              disable gui type internal], gui_internal=$enableval;gui_internal_reason="configure parameter")
730 AM_CONDITIONAL(GUI_INTERNAL, test "x${gui_internal}" = "xyes")
731 # win32
732 AC_ARG_ENABLE(gui-win32, [  --disable-gui-win32                 disable gui type win32], gui_win32=$enableval;gui_win32_reason="configure parameter")
733 AM_CONDITIONAL(GUI_WIN32, test "x${gui_win32}" = "xyes")
734
735 ## speech
736 # android
737 AC_ARG_ENABLE(speech-android, [  --disable-speech-android            disable speech type android], speech_android=$enableval;speech_android_reason="configure parameter")
738 AM_CONDITIONAL(SPEECH_ANDROID, test "x${speech_android}" = "xyes")
739 # cmdline
740 AC_ARG_ENABLE(speech-cmdline, [  --disable-speech-cmdline            disable speech type cmdline], speech_cmdline=$enableval;speech_cmdline_reason="configure parameter")
741 AM_CONDITIONAL(SPEECH_CMDLINE, test "x${speech_cmdline}" = "xyes")
742 # espeak
743 AC_ARG_ENABLE(speech-espeak, [  --disable-speech-espeak            disable speech type espeak], speech_espeak=$enableval;speech_espeak_reason="configure parameter")
744 AM_CONDITIONAL(SPEECH_ESPEAK, test "x${speech_espeak}" = "xyes")
745 # speech-dispatcher
746 AC_ARG_ENABLE(speech-speech-dispatcher, [  --disable-speech-speech-dispatcher  disable speech type speech-dispatcher], speech_speech_dispatcher=$enableval;speech_speech_dispatcher_reason="configure parameter")
747 if test "x$speech_speech_dispatcher" = "xyes"; then
748         AC_CHECK_HEADER(libspeechd.h, AC_DEFINE([HAVE_LIBSPEECHD],[],Define to 1 if you have the <libspeechd.h> header file.) SPEECHD_LIBS="-lspeechd",  speech_speech_dispatcher=no; speech_speech_dispatcher_reason="libspeechd.h missing")
749 fi
750 AC_SUBST(SPEECHD_CFLAGS)
751 AC_SUBST(SPEECHD_LIBS)
752 AM_CONDITIONAL(SPEECH_SPEECH_DISPATCHER, test "x${speech_speech_dispatcher}" = "xyes")
753 AM_CONDITIONAL(SUPPORT_ESPEAK, test "x${support_espeak}" = "xyes")
754
755 ## vehicle
756 # android
757 AC_ARG_ENABLE(vehicle-android, [  --disable-vehicle-android             disable vehicle type android], vehicle_android=$enableval;vehicle_android_reason="configure parameter")
758 AM_CONDITIONAL(VEHICLE_ANDROID, test "x${vehicle_android}" = "xyes")
759 # demo
760 AC_ARG_ENABLE(vehicle-demo, [  --disable-vehicle-demo              disable vehicle type demo], vehicle_demo=$enableval;vehicle_demo_reason="configure parameter")
761 AM_CONDITIONAL(VEHICLE_DEMO, test "x${vehicle_demo}" = "xyes")
762 # file
763 AC_ARG_ENABLE(vehicle-file, [  --disable-vehicle-file              disable vehicle type file], vehicle_file=$enableval;vehicle_file_reason="configure parameter")
764 AM_CONDITIONAL(VEHICLE_FILE, test "x${vehicle_file}" = "xyes")
765 # gpsd
766 AC_ARG_ENABLE(vehicle-gpsd, [  --disable-vehicle-gpsd              disable vehicle type gpsd], vehicle_gpsd=$enableval;vehicle_gpsd_reason="configure parameter")
767 if test "x${vehicle_gpsd}" = xyes
768 then
769         AC_CHECK_HEADER(gps.h, AC_DEFINE([HAVE_LIBGPS],[],Define to 1 if you have the <gps.h> header file.) GPSD_LIBS="-lgps", vehicle_gpsd=no; vehicle_gpsd_reason="no gps.h" )
770 fi
771 AC_SUBST(GPSD_CFLAGS)
772 AC_SUBST(GPSD_LIBS)
773 AM_CONDITIONAL(VEHICLE_GPSD, [test "x${vehicle_gpsd}" = "xyes"])
774 # gypsy
775 AC_ARG_ENABLE(vehicle-gypsy,[  --disable-vehicle-gypsy             disable vehicle type gypsy], vehicle_gypsy=$enableval;vehicle_gypsy_reason="configure parameter")
776 if test "x${vehicle_gypsy}" = "xyes"
777 then
778         PKG_CHECK_MODULES(GYPSY, gypsy, ,vehicle_gypsy=no;vehicle_gypsy_reason="package gypsy missing")
779 fi
780 AC_SUBST(GYPSY_CFLAGS)
781 AC_SUBST(GYPSY_LIBS)
782 AM_CONDITIONAL(VEHICLE_GYPSY, test "x${vehicle_gypsy}" = "xyes")
783 # null
784 AC_ARG_ENABLE(vehicle-null, [  --enable-vehicle-null             enable vehicle type null], vehicle_null=$enableval;vehicle_null_reason="configure parameter")
785 AM_CONDITIONAL(VEHICLE_NULL, test "x${vehicle_null}" = "xyes")
786 # wince
787 AC_ARG_ENABLE(vehicle-wince, [  --disable-vehicle-wince             disable vehicle type wince], vehicle_wince=$enableval;vehicle_wince_reason="configure parameter")
788 AM_CONDITIONAL(VEHICLE_WINCE, test "x${vehicle_wince}" = "xyes")
789 # iphone
790 AC_ARG_ENABLE(vehicle-iphone, [  --disable-vehicle-iphone              disable vehicle type iphone], vehicle_iphone=$enableval;vehicle_iphone_reason="configure parameter")
791 AM_CONDITIONAL(VEHICLE_IPHONE, test "x${vehicle_iphone}" = "xyes")
792 if test "x${vehicle_iphone}" = "xyes"
793 then
794         IPHONE_LIBS=-Wl,-framework,CoreLocation
795 fi
796 AC_SUBST(IPHONE_CFLAGS)
797 AC_SUBST(IPHONE_LIBS)
798 NAVIT_CFLAGS="$NAVIT_CFLAGS $GLIB_CFLAGS $GMODULE_CFLAGS"
799 NAVIT_LIBS="$NAVIT_LIBS $GLIB_LIBS $GMODULE_LIBS $LIBINTL"
800 AC_SUBST(NAVIT_CFLAGS)
801 AC_SUBST(NAVIT_LIBS)
802 AC_SUBST(WORDEXP_LIBS)
803 AC_SUBST(LIBC_LIBS)
804 AC_SUBST(WINDRES)
805
806 AC_CONFIG_FILES([
807 Makefile
808 navit/Makefile
809 navit/binding/Makefile
810 navit/binding/python/Makefile
811 navit/binding/dbus/Makefile
812 navit/map/Makefile
813 navit/map/mg/Makefile
814 navit/map/textfile/Makefile
815 navit/map/shapefile/Makefile
816 navit/map/filter/Makefile
817 navit/map/binfile/Makefile
818 navit/map/garmin/Makefile
819 navit/map/poi_geodownload/Makefile
820 navit/map/poi_geodownload/libmdb/Makefile
821 navit/map/poi_geodownload/libmdb/include/Makefile
822 navit/maptool/Makefile
823 navit/fib-1.1/Makefile
824 navit/font/Makefile
825 navit/font/freetype/Makefile
826 navit/fonts/Makefile
827 navit/graphics/Makefile
828 navit/graphics/android/Makefile
829 navit/graphics/gd/Makefile
830 navit/graphics/gtk_drawing_area/Makefile
831 navit/graphics/opengl/Makefile
832 navit/graphics/null/Makefile
833 navit/graphics/sdl/Makefile
834 navit/graphics/qt_qpainter/Makefile
835 navit/graphics/win32/Makefile
836 navit/gui/Makefile
837 navit/gui/gtk/Makefile
838 navit/gui/internal/Makefile
839 navit/gui/win32/Makefile
840 navit/osd/Makefile
841 navit/osd/core/Makefile
842 navit/speech/Makefile
843 navit/speech/android/Makefile
844 navit/speech/cmdline/Makefile
845 navit/speech/espeak/Makefile
846 navit/speech/speech_dispatcher/Makefile
847 navit/support/Makefile
848 navit/support/espeak/Makefile
849 navit/support/ezxml/Makefile
850 navit/support/glib/Makefile
851 navit/support/libc/Makefile
852 navit/support/libpng/Makefile
853 navit/support/win32/Makefile
854 navit/support/wordexp/Makefile
855 navit/support/zlib/Makefile
856 navit/vehicle/Makefile
857 navit/vehicle/android/Makefile
858 navit/vehicle/file/Makefile
859 navit/vehicle/gpsd/Makefile
860 navit/vehicle/gpsd_dbus/Makefile
861 navit/vehicle/gypsy/Makefile
862 navit/vehicle/null/Makefile
863 navit/vehicle/demo/Makefile
864 navit/vehicle/wince/Makefile
865 navit/vehicle/iphone/Makefile
866 navit/xpm/Makefile
867 navit/maps/Makefile
868 intl/Makefile
869 po/Makefile
870 ])
871 #src/data/garmin_img/Makefile
872
873 AC_OUTPUT
874
875
876 echo ""
877 echo ""
878 echo "Summary of your installation :"
879 # FIXME : maybe elaborate missing dependencies
880 if test x"$sdl" != xyes
881         then
882         sdl_failures="(libsdl maybe?) "
883 fi
884 if test x"$xmu" != xyes
885         then                
886         sdl_failures=$sdl_failures"libxmu "
887 fi        
888 if test x"$glut" != xyes
889        then
890         sdl_failures=$sdl_failures"glut "
891 fi
892 if test x"$glc" != xyes
893         then
894         sdl_failures=$sdl_failures"quesoglc "
895 fi
896 if test -z "$sdl_failures"
897         then
898         echo "OpenGL gui  : ENABLED, with $CEGUI_LIBS"
899         else
900                  echo "OpenGL gui  : DISABLED : you are missing $sdl_failures"
901 fi
902 if test x"$enable_hildon" = xyes
903         then
904         echo "Maemo/Hildon: ENABLED"
905         else
906         echo "Maemo/Hildon: DISABLED"
907 fi
908 if test x"${USE_GARMIN}" = xyes
909         then
910         if test "x$use_libgarmin" = "xyes"
911                 then
912                 echo "Garmin IMG  : ENABLED"
913                 else
914                 echo "Garmin IMG  : DISABLED (you don't have libgarmin)"
915         fi
916         else 
917                 echo "Garmin IMG  : DISABLED (you requested it)"
918 fi
919
920 if test x"$LIBINTL" = "x" ;then
921         nls_libs="system gettext support"
922 else
923         nls_libs="$LIBINTL"
924 fi
925 echo "Plugins:             $plugins ($plugins_reason)"
926 echo "Postgresql:          $postgresql ($postgresql_reason)"
927 echo "Samplemap:           $samplemap ($samplemap_reason)"
928 echo "NLS Support:         $enable_nls ($nls_libs)"
929 echo "Font renderers:"
930 echo "  freetype:          $font_freetype ($font_freetype_reason)"
931 echo "Graphics types:"
932 echo "  android:  $graphics_android ($graphics_android_reason)"
933 echo "  gtk_drawing_area:  $graphics_gtk_drawing_area ($graphics_gtk_drawing_area_reason)"
934 echo "  qt_qpainter:       $graphics_qt_qpainter ($graphics_qt_qpainter_reason)"
935 echo "  win32:             $graphics_win32 ($graphics_win32_reason)"
936 echo "  OpenGL:            $graphics_opengl ($graphics_opengl_reason)"
937 echo "  gd:                $graphics_gd ($graphics_gd_reason)"
938 echo "  sdl:               $graphics_sdl ($graphics_sdl_reason)"
939
940 echo "GUI types:"
941 echo "  gtk:               $gui_gtk ($gui_gtk_reason)"
942 echo "  internal:          $gui_internal ($gui_internal_reason)"
943 echo "  win32:             $gui_win32 ($gui_win32_reason)"
944
945 echo "Bindings:"
946 echo "  dbus:              $binding_dbus ($binding_dbus_reason)"
947 echo "  python:            $binding_python ($binding_python_reason)"
948
949 echo "Speech types:"
950 echo "  android:           $speech_android ($speech_android_reason)"
951 echo "  cmdline:           $speech_cmdline ($speech_cmdline_reason)"
952 echo "  espeak:            $speech_espeak ($speech_espeak_reason)"
953 echo "  speech_dispatcher: $speech_speech_dispatcher ($speech_speech_dispatcher_reason)"
954
955 echo "Vehicle types:"
956 echo "  android:           $vehicle_android ($vehicle_android_reason)"
957 echo "  demo:              $vehicle_demo ($vehicle_demo_reason)"
958 echo "  file:              $vehicle_file ($vehicle_file_reason)"
959 echo "  gpsd:              $vehicle_gpsd ($vehicle_gpsd_reason)"
960 echo "  gpsd_dbus:         $vehicle_gpsd_dbus ($vehicle_gpsd_dbus_reason)"
961 echo "  gypsy:             $vehicle_gypsy ($vehicle_gypsy_reason)"
962 echo "  null:              $vehicle_null ($vehicle_null_reason)"
963 echo "  wince:             $vehicle_wince ($vehicle_wince_reason)"
964 echo "  iphone:            $vehicle_iphone ($vehicle_iphone_reason)"
965
966 if  test "x${gtk2_pkgconfig}" != "xyes" -a "x${gui_win32}" != "xyes" -a "x${gui_internal}" != "xyes"
967 then
968         echo ""
969         echo "" 
970         echo "*** WARNING! you have no gui that can be built! ***"
971         echo "Please install the dependency for at least gtk or sdl gui"
972         echo "For more details, see the wiki at http://wiki.navit-project.org/"
973         echo "" 
974         exit 1
975 fi
976