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