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