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