Update:Gui:Removing deprecated graphics
[navit-package] / configure.in
index a03d7ab..f44099d 100644 (file)
@@ -1,9 +1,59 @@
-AC_INIT(navit, 0.1.0)
+AC_INIT(navit, 0.1.1)
+SOURCE_MODE=svn
+
 AM_INIT_AUTOMAKE
 AM_CONFIG_HEADER(config.h)
+
+AC_SUBST(SOURCE_MODE)
+AM_CONDITIONAL(SOURCE_MODE_SVN, [test "x${SOURCE_MODE}" = "xsvn"])
+
+if test "x${SOURCE_MODE}" = "xsvn" ; then
+       USE_MAINTAINER_MODE=yes
+else
+       USE_MAINTAINER_MODE=no
+fi
+
+AC_DEFUN([AM_MAINTAINER_MODE],
+[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+  dnl maintainer-mode is enabled by default (reason of inclusion of this function)
+  AC_ARG_ENABLE(maintainer-mode,
+[  --enable-maintainer-mode  enable make rules and dependencies not useful
+                          (and sometimes confusing) to the casual installer],
+      USE_MAINTAINER_MODE=$enableval)
+  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
+  MAINT=$MAINTAINER_MODE_TRUE
+  AC_SUBST(MAINT)dnl
+]
+)
+
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+
 AM_MAINTAINER_MODE
 
 
+plugins=yes; plugins_reason=default
+postgresql=yes; postgresql_reason=default
+samplemap=yes; samplemap_reason=default
+binding_dbus=yes; binding_dbus_reason=default
+binding_python=yes; binding_python_reason=default
+font_freetype=yes; font_freetype_reason=default
+gui_gtk=no; gui_gtk_reason=default
+gui_win32=no; gui_win32_reason=default
+gui_internal=yes; gui_internal_reason=default
+graphics_gd=no; graphics_gd_reason=default
+graphics_gtk_drawing_area=no; graphics_gtk_drawing_area_reason=default
+graphics_qt_qpainter=yes; graphics_qt_qpainter_reason=default
+graphics_opengl=yes; graphics_opengl_reason=default
+graphics_win32=no; graphics_win32_reason=default
+speech_cmdline=yes; speech_cmdline_reason=default
+speech_speech_dispatcher=yes; speech_speech_dispatcher_reason=default
+vehicle_demo=yes; vehicle_demo_reason=default
+vehicle_file=yes; vehicle_file_reason=default
+vehicle_gpsd=yes; vehicle_gpsd_reason=default
+vehicle_gypsy=yes; vehicle_gypsy_reason=default
+vehicle_wince=no; vehicle_wince_reason=default
+
 m4_ifndef([AC_USE_SYSTEM_EXTENSIONS],
        [AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], [AC_GNU_SOURCE])])
 
@@ -17,29 +67,26 @@ AM_PROG_CC_C_O
 
 AC_PROG_CXX
 if eval "test x$GXX = xyes"; then
-        CXXFLAGS="$CXXFLAGS -Wall -Wcast-align -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wreturn-type -D_GNU_SOURCE"
+        CXXFLAGS="$CXXFLAGS -Wall -Wcast-align -Wpointer-arith -Wreturn-type -D_GNU_SOURCE"
 fi
 
 PKG_CHECK_EXISTS
+if test "x${cross_compiling}" = "xyes"; then
+       samplemap="no";samplemap_reason="not supported for cross compiling"
+       binding_python="no";binding_python_reason="not supported for cross compiling"
+       postgresql="no";postgresql_reason="not supported for cross compiling"
+       AC_MSG_CHECKING([for a C compiler for build tools])
+       AC_CHECK_PROGS(CC_FOR_BUILD, gcc cc)
+else
+       CC_FOR_BUILD=$CC
+fi
+CCLD_FOR_BUILD="$CC_FOR_BUILD"
+AC_SUBST(cross_compiling)
+AC_SUBST(CC_FOR_BUILD)
+AC_SUBST(CCLD_FOR_BUILD)
 
-AC_ARG_ENABLE(plugins,         [  --disable-plugins          disable plugins], 
-                       [
-                               AC_DISABLE_SHARED
-                               AC_ENABLE_STATIC
-                               plugins=$enableval
-                       ],
-                       [
-                               AC_ENABLE_SHARED
-                               AC_DISABLE_STATIC
-                               AC_DEFINE(
-                                       [USE_PLUGINS],
-                                       [],
-                                       Define to 1 if you have plugins.
-                               )
-                               plugins=yes
-                       ]
-)
-AC_PROG_LIBTOOL
+AC_ARG_ENABLE(variant, [  --enable-variant=something          set variant], NAVIT_VARIANT=$enableval)
+AC_SUBST(NAVIT_VARIANT)
 
 AC_ARG_ENABLE(avoid-unaligned, [  --enable-avoid-unaligned          avoid unaligned accesses], AVOID_UNALIGNED=$enableval, AVOID_UNALIGNED=no)
 test x"${AVOID_UNALIGNED}" = xyes && AC_DEFINE(AVOID_UNALIGNED,[],Define to avoid unaligned access)
@@ -47,12 +94,19 @@ test x"${AVOID_UNALIGNED}" = xyes && AC_DEFINE(AVOID_UNALIGNED,[],Define to avoi
 AC_ARG_ENABLE(avoid-float, [  --enable-avoid-float              avoid floating point calculations], AVOID_FLOAT=$enableval, AVOID_FLOAT=no)
 test x"${AVOID_FLOAT}" = xyes && AC_DEFINE(AVOID_FLOAT,[],Define to avoid floating point)
 
-AC_ARG_ENABLE(hildon, [  --enable-hildon              build with maemo/hildon support], enable_hildon=$enableval, enable_hildon=no)
+AC_ARG_ENABLE(hildon, [  --disable-hildon              build without maemo/hildon support], enable_hildon=$enableval, enable_hildon=yes)
 if test "x${enable_hildon}" = "xyes" ; then
-       PKG_CHECK_MODULES(enable_hildon, hildon-libs >= 0.12.24, , [
+       PKG_CHECK_MODULES(HILDON, hildon-1 >= 0.9.9, , [
                AC_MSG_RESULT(no)
                enable_hildon=no
        ])
+       PKG_CHECK_MODULES(GPSBT, gpsbt, [
+               AC_DEFINE(HAVE_GPSBT, 1, [Have the gpsbt library])
+               AC_SUBST(GPSBT_CFLAGS)
+               AC_SUBST(GPSBT_LIBS)
+               ], [
+               AC_MSG_RESULT(no)
+       ])
        if test x"${enable_hildon}" = xyes ; then
                AC_DEFINE(USE_HILDON, 1, [Build with maemo/hildon support])
                AC_SUBST(HILDON_CFLAGS)
@@ -61,11 +115,14 @@ if test "x${enable_hildon}" = "xyes" ; then
 fi
 AM_CONDITIONAL(USE_HILDON, test "${enable_hildon}" = "xyes")
 
-AC_ARG_ENABLE(libgps, [  --disable-libgps             don't use libgps], USE_LIBGPS=$enableval, USE_LIBGPS=yes)
-AC_ARG_ENABLE(gypsy, [  --disable-gypsy             don't use gypsy], USE_GYPSY=$enableval, USE_GYPSY=yes)
 AC_ARG_ENABLE(garmin, [  --disable-garmin             disable garmin support], USE_GARMIN=$enableval, USE_GARMIN=yes)
 
-AC_ARG_ENABLE(samplemap, [  --disable-samplemap             don't build the samplemap], samplemap=$enableval, samplemap=yes)
+# samplemap
+AC_PATH_PROG(_PATH_BZCAT,[bzcat])
+if test "x${_PATH_BZCAT}" = "x" ; then
+       samplemap=no; samplemap_reason="bzcat missing"
+fi
+AC_ARG_ENABLE(samplemap, [  --disable-samplemap             don't build the samplemap], samplemap=$enableval;samplemap_reason="configure parameter")
 AM_CONDITIONAL(BUILD_SAMPLEMAP, [test "x$samplemap" = "xyes"])
 
 AC_ARG_ENABLE(fastmath, [  --disable-fastmath             don't build with fastmath], fastmath=$enableval, fastmath=yes)
@@ -80,23 +137,52 @@ fi
 X_CFLAGS="-I$x_includes"
 AS_IF([test -n "$ac_x_libraries"], [X_LIBS="-L$ac_x_libraries"])
 
-PKG_CHECK_MODULES(NAVIT, [glib-2.0 gmodule-2.0 gthread-2.0],
-       [
-               glib=yes
-       ]
-       [
-       AC_MSG_WARN([glib-2.0 or gmodule-2.0 not found. Usually you need to install a package named glib2-devel or libglib2.0-dev])
-       glib=no
-       NAVIT_CFLAGS="-I\$(top_srcdir)/navit/support -I\$(top_srcdir)/navit/support/glib -I\$(top_srcdir)/navit/support/ezxml"
-       NAVIT_LIBS="-L\$(top_builddir)/navit/support/glib -lsupport_glib -L\$(top_builddir)/navit/support/ezxml -lsupport_ezxml"
-       ]
-)
-if test "x$glib" = "xyes"; then
+# glib
+AC_ARG_ENABLE(glib, [  --disable-glib             don't build with external glib], glib=$enableval, glib=yes)
+if test x"${glib}" = "xyes"; then
+       PKG_CHECK_MODULES(GLIB, [glib-2.0 gthread-2.0], [glib=yes],[glib=no])
+fi
+if test "x${glib}" = "xyes"; then
        AC_DEFINE(HAVE_GLIB, 1, [Define to 1 if you have (external) glib library])
+else
+       GLIB_CFLAGS="-I\$(top_srcdir)/navit/support -I\$(top_srcdir)/navit/support/glib -I\$(top_srcdir)/navit/support/ezxml"
+       GLIB_LIBS="-L\$(top_builddir)/navit/support/glib -lsupport_glib -L\$(top_builddir)/navit/support/ezxml -lsupport_ezxml"
+fi
+
+# gmodule
+AC_ARG_ENABLE(gmodule, [  --disable-gmodule             don't build with gmodule], gmodule=$enableval, gmodule=yes)
+if test x"${gmodule}" = "xyes"; then
+       PKG_CHECK_MODULES(GMODULE, [gmodule-2.0], [gmodule=yes], [gmodule=no])
+fi
+if test "x${gmodule}" = "xyes"; then
+       AC_DEFINE(HAVE_GMODULE, 1, [Define to 1 if you have gmodule])
+else
+       AC_CHECK_LIB(dl, dlopen,
+               [plugins_reason="default, via dlopen";GMODULE_LIBS="-ldl";AC_DEFINE(HAVE_DLOPEN, 1, [Define to 1 if you have dlopen])],          
+               [plugins="no"; plugins_reason="package gmodule and dlopen missing"]
+       )
 fi
+# plugins
+AC_ARG_ENABLE(plugins,         [  --disable-plugins          disable plugins], [ plugins=$enableval;plugin_reason="configure parameter" ])
+if test "x${plugins}" = "xyes"; then
+       AC_ENABLE_SHARED
+       AC_DISABLE_STATIC
+       AC_DEFINE(
+               [USE_PLUGINS],
+               [],
+               Define to 1 if you have plugins.
+       )
+else
+       AC_DISABLE_SHARED
+       AC_ENABLE_STATIC
+fi
+AM_CONDITIONAL(PLUGINS, [test "x$plugins" = "xyes"])
+AC_PROG_LIBTOOL
+
 AM_CONDITIONAL(EVENT_GLIB, [test "x$glib" = "xyes"])
 AM_CONDITIONAL(SUPPORT_GLIB, [test "x$glib" = "xno"])
 AM_CONDITIONAL(SUPPORT_EZXML, [test "x$glib" = "xno"])
+AM_CONDITIONAL(MAP_POI_GEODOWNLOAD, [test "x$glib" = "xyes"])
 
 AC_CHECK_HEADER(
        zlib.h,
@@ -115,50 +201,21 @@ AM_CONDITIONAL(SUPPORT_ZLIB, [test "x$zlib" = "xno"])
 AC_SUBST(ZLIB_CFLAGS)
 AC_SUBST(ZLIB_LIBS)
 
-AC_ARG_ENABLE(gui-gtk, [  --disable-gui-gtk             don't create gui gtk ], MODULE_GUI_GTK=$enableval, MODULE_GUI_GTK=yes)
-if test "x$MODULE_GUI_GTK" = "xyes"; then
-       PKG_CHECK_MODULES(GTK2, [gtk+-2.0], [gtk2_pkgconfig=yes], [gtk2_pkgconfig=no])
-       if test "x$gtk2_pkgconfig" = "xyes"; then
-               AC_DEFINE(HAVE_GTK2, 1, [Define to 1 if you have gtk2])
-       fi
+# gtk
+PKG_CHECK_MODULES(GTK2, [gtk+-2.0], [gtk2_pkgconfig=yes], [gtk2_pkgconfig=no])
+if test "x$gtk2_pkgconfig" = "xyes"; then
+       AC_DEFINE(HAVE_GTK2, 1, [Define to 1 if you have gtk2])
+       graphics_gtk_drawing_area=yes; graphics_gtk_drawing_area_reason="gtk+-2.0 present"
+       gui_gtk=yes; gui_gtk_reason="gtk+-2.0 present"
 fi
 
-GTK2_CFLAGS="$GTK2_CFLAGS -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
-
-AC_SUBST(GTK2_CFLAGS)
-AC_SUBST(GTK2_LIBS)
-AM_CONDITIONAL(GUI_GTK, [test "x$gtk2_pkgconfig" = "xyes"])
-AM_CONDITIONAL(GRAPHICS_GTK_DRAWING_AREA, [test "x$gtk2_pkgconfig" = "xyes"])
-AM_CONDITIONAL(PLUGINS, [test "x$plugins" = "xyes"])
-
-AC_ARG_ENABLE(directfb, [  --enable-directfb             enable directfb gui and graphics], MODULE_DIRECTFB=$enableval, MODULE_DIRECTFB=no)
-
-if test "x$MODULE_DIRECTFB" = "xyes"; then
-       PKG_CHECK_MODULES(DIRECTFB, [directfb], [directfb_pkgconfig=yes], [directfb_pkgconfig=no])
-       if test "x$directfb_pkgconfig" = "xyes"; then
-               AC_DEFINE(HAVE_DIRECTFB, 1, [Define to 1 if you have directfb])
-       fi
-fi
-
-DIRECTFB_CFLAGS="$DIRECTFB_CFLAGS"
-
-#DIRECTFB_CFLAGS="-D_REENTRANT -I/data/oe/tmp/staging/arm-angstrom-linux-gnueabi/usr/include/directfb/"
-#DIRECTFB_LIBS="-L/data/oe/tmp/staging/arm-angstrom-linux-gnueabi/usr/lib/ -ldirectfb -lfusion -ldirect -lpthread"
+# fsync
+AC_MSG_CHECKING(for fsync)
+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))
 
-AC_SUBST(DIRECTFB_CFLAGS)
-AC_SUBST(DIRECTFB_LIBS)
-AM_CONDITIONAL(DIRECTFB, [test "x$directfb_pkgconfig" = "xyes"])
-
-AC_ARG_ENABLE(graphics-qt-qpainter, [  --disable-graphics-qt-qpainter             don't create graphics qt-qpainter], enable_graphics_qt_qpainter=$enableval, enable_graphics_qt_qpainter=yes)
-if test "x${enable_graphics_qt_qpainter}" = "xyes" ; then
-       PKG_CHECK_MODULES(QT_GUI, [QtGui QtCore], ,enable_graphics_qt_qpainter=no)
-fi
-if test "x${enable_graphics_qt_qpainter}" = "xyes" ; then
-       AC_DEFINE(USE_GRAPICS_QT_QPAINTER, 1, [Build with graphics qt_qpainter])
-       AC_SUBST(QT_GUI_CFLAGS)
-       AC_SUBST(QT_GUI_LIBS)
-fi
-AM_CONDITIONAL(USE_GRAPHICS_QT_QPAINTER, test "x${enable_graphics_qt_qpainter}" = "xyes")
+# system
+AC_MSG_CHECKING(for system)
+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))
 
 AC_ARG_ENABLE(graphics-sdl, [  --disable-graphics-sdl             don't create graphics sdl], enable_graphics_sdl=$enableval, enable_graphics_sdl=yes)
 if test "x${enable_graphics_sdl}" = "xyes" ; then
@@ -191,14 +248,19 @@ if test "x${enable_graphics_sdl}" = "xyes" ; then
 fi
 AM_CONDITIONAL(USE_GRAPHICS_SDL, test "x${enable_graphics_sdl}" = "xyes")
 
-AC_ARG_ENABLE(postgresql, [  --disable-postgresql             don't add postgresql support to osm2navit], enable_postgresql=$enableval, enable_postgresql=yes)
-if test "x${enable_postgresql}" = "xyes" ; then
+AC_ARG_ENABLE(postgresql, [  --disable-postgresql             don't add postgresql support to osm2navit], postgresql=$enableval;postgresql_reason="configure parameter")
+if test "x${postgresql}" = "xyes" ; then
        if test -z "$PG_CONFIG"; then
             AC_PATH_PROG([PG_CONFIG], [pg_config], [])
         fi
         AC_MSG_CHECKING([for PostgreSQL libraries with $PG_CONFIG])
        if test ! -x "$PG_CONFIG"; then
-           enable_postgresql = "no"
+           if test "x${PG_CONFIG}" = "x" ; then
+                postgresql_reason="$PG_CONFIG not executable"
+           else
+                postgresql_reason="pg_config missing"
+            fi
+           postgresql=no 
             AC_MSG_RESULT([no])
        else
            POSTGRESQL_CFLAGS="-I`$PG_CONFIG --includedir`"
@@ -209,14 +271,16 @@ if test "x${enable_postgresql}" = "xyes" ; then
             AC_MSG_RESULT([yes])
                fi 
 fi
-AM_CONDITIONAL(HAVE_POSTGRESQL, test "x${enable_postgresql}" = "xyes")
-
-PKG_CHECK_MODULES(FREETYPE2, [freetype2], [freetype2_pkgconfig=yes], [freetype2_pkgconfig=no])
-if test "x$freetype2_pkgconfig" = "xyes"; then
-   AC_DEFINE(HAVE_FREETYPE2, 1, [Define to 1 if you have freetype2])
+AM_CONDITIONAL(HAVE_POSTGRESQL, test "x${postgresql}" = "xyes")
+# font
+# freetype
+AC_ARG_ENABLE(font-freetype, [  --disable-font-freetype             don't add freetype support], font_freetype=$enableval;font_freetype_reason="configure parameter")
+if test "x${font_freetype}" = "xyes" -a "x${FREETYPE2_CFLAGS}" = "x" -a "x${FREETYPE2_LIBS}" = "x"; then
+       PKG_CHECK_MODULES(FREETYPE2, [freetype2], , [font_freetype=no;font_freetype_reason="Package freetype2 missing"])
 fi
 AC_SUBST(FREETYPE2_CFLAGS)
 AC_SUBST(FREETYPE2_LIBS)
+AM_CONDITIONAL(FONT_FREETYPE, test "x${font_freetype}" = "xyes")
 
 PKG_CHECK_MODULES(FONTCONFIG, [fontconfig], [fontconfig_pkgconfig=yes], [fontconfig_pkgconfig=no])
 if test "x$fontconfig_pkgconfig" = "xyes"; then
@@ -225,6 +289,8 @@ fi
 AC_SUBST(FONTCONFIG_CFLAGS)
 AC_SUBST(FONTCONFIG_LIBS)
 
+AM_CONDITIONAL(FONTS, test "x${font_freetype}" = "xyes" -a "x$fontconfig_pkgconfig" != "xyes")
+
 PKG_CHECK_MODULES(IMLIB2, [imlib2], [imlib2_pkgconfig=yes], [imlib2_pkgconfig=no])
 if test "x$imlib2_pkgconfig" = "xyes"; then
    AC_DEFINE(HAVE_IMLIB2, 1, [Define to 1 if you have imlib2])
@@ -233,14 +299,6 @@ AC_SUBST(IMLIB2_CFLAGS)
 AC_SUBST(IMLIB2_LIBS)
 
 
-AC_ARG_ENABLE(speech-speechd, [  --disable-speech-speechd             don't create speech speechd ], MODULE_SPEECH_SPEECHD=$enableval, MODULE_SPEECH_SPEECHD=yes)
-if test "x$MODULE_SPEECH_SPEECHD" = "xyes"; then
-       AC_CHECK_HEADER(libspeechd.h, AC_DEFINE([HAVE_LIBSPEECHD],[],Define to 1 if you have the <libspeechd.h> header file.) SPEECHD_LIBS="-lspeechd" speechd=yes,  AC_MSG_WARN([*** no libspeechd.h -- Speech output disabled]))
-fi
-AC_SUBST(SPEECHD_CFLAGS)
-AC_SUBST(SPEECHD_LIBS)
-AM_CONDITIONAL(SPEECH_SPEECH_DISPATCHER, [test "x$speechd" = "xyes"])
-
 
 AC_ARG_ENABLE(gui-sdl, [  --disable-gui-sdl             don't create gui sdl ], MODULE_GUI_SDL=$enableval, MODULE_GUI_SDL=yes)
 if test "x$MODULE_GUI_SDL" = "xyes"; then
@@ -257,19 +315,6 @@ if test "x$MODULE_GUI_SDL" = "xyes"; then
        )
 fi
 
-PKG_CHECK_MODULES(
-        [CEGUI],
-        [CEGUI-OPENGL >= 0.5.0],
-        [
-                AC_DEFINE(
-                        [HAVE_CEGUI],
-                        [],
-                        [Define to 1 if you have the @<:@CEGUI/CEGUI.h@:>@ header file.])
-                cegui=yes
-        ],
-        [AC_MSG_WARN([*** CEGUI not found -- SDL support disabled])]
-)
-
 AC_CHECK_HEADER(
         X11/Xmu/Xmu.h,
         AC_DEFINE(
@@ -281,6 +326,9 @@ AC_CHECK_HEADER(
         AC_MSG_WARN([*** no X11/Xmu/Xmu.h -- opengl and SDL support disabled])
 )
 
+AC_ARG_ENABLE(graphics-opengl, [  --disable-graphics-opengl      disable graphics type OpenGL], graphics_opengl=$enableval;graphics_opengl_reason="configure parameter")
+if test "x${graphics_opengl}" = "xyes" ; then
+
 AC_CHECK_HEADER(
        GL/gl.h,
        AC_DEFINE(
@@ -290,7 +338,7 @@ AC_CHECK_HEADER(
                )
                OPENGL_LIBS="$X_LIBS -lGL -lGLU"
                opengl=yes,
-       AC_MSG_WARN([*** no GL/gl.h -- opengl and SDL support disabled])
+       AC_MSG_WARN([*** no GL/gl.h -- opengl and SDL support disabled];graphics_opengl=no;graphics_opengl_reason="Headers missing")
 )
 
 AC_CHECK_HEADER(
@@ -301,7 +349,7 @@ AC_CHECK_HEADER(
                Define to 1 if you have the <GL/glut.h> header file.
                )
                glut=yes,
-       AC_MSG_WARN([*** no GL/glut.h -- opengl and SDL support disabled])
+       AC_MSG_WARN([*** no GL/glut.h -- opengl and SDL support disabled]);graphics_opengl=no;graphics_opengl_reason="Headers missing"
 )
 
 AC_SUBST(OPENGL_CFLAGS)
@@ -320,123 +368,11 @@ AC_CHECK_HEADER(
 )
 AC_SUBST(GLC_CFLAGS)
 AC_SUBST(GLC_LIBS)
-
-if test x"$cegui" = xyes        
-               then     
-        # Save the LIBS into a temp var since AC_CHECK_LIB adds the lib into LIBS       
-        # and we want just to check and use CEGUI_LIBS          
-        libstemp="$LIBS"        
-        # For CEGUI, we have to check the presence of some libraries.   
-        # The following are mandatory (used by navit)   
-        # If the user installed NavIt without, issue a warning and disable CEGUI        
-        AC_CHECK_LIB(CEGUIBase, main,   
-                 [],    
-                 [      
-                echo "Error! Something is wrong with CEGUIBase. Do you have at least cegui-0.5?"        
-                ])      
-        AC_CHECK_LIB(CEGUIOpenGLRenderer, main,         
-                 [],    
-                 [      
-                echo "Error! Something is wrong with CEGUIOpenGLRenderer. Do you have at least cegui-0.5? "     
-                ], $OPENGL_LIBS )       
-        AC_CHECK_LIB(CEGUIFalagardWRBase, main,         
-                 [],    
-                 [      
-                echo "Error! Something is wrong with CEGUIFalagardWRBase. Do you have at least cegui-0.5?"      
-                ], $OPENGL_LIBS)        
-        CEGUI_LIBS="-lCEGUIBase -lCEGUIOpenGLRenderer -lCEGUIFalagardWRBase"    
-                
-        # The following are optional, but we need to link against them if cegui was built with them     
-        AC_CHECK_LIB(CEGUIXercesParser, main,   
-                 [CEGUI_LIBS="$CEGUI_LIBS -lCEGUIXercesParser"],        
-                 [echo "CEGUIXercesParser not found/not working, disabled."],   
-                 $OPENGL_LIBS   
-        )       
-                
-        AC_CHECK_LIB(CEGUIExpatParser, main,    
-                 [CEGUI_LIBS="$CEGUI_LIBS -lCEGUIExpatParser"],         
-                 [echo "CEGUIExpatParser not found/not working, disabled."],    
-                 $OPENGL_LIBS   
-        )       
-                
-        AC_CHECK_LIB(CEGUILibxmlParser, main,   
-                 [CEGUI_LIBS="$CEGUI_LIBS -lCEGUILibxmlParser"],        
-                 [echo "CEGUILibxmlParser not found/not working, disabled."],   
-                 $OPENGL_LIBS   
-        )       
-                
-        AC_CHECK_LIB(CEGUITinyXMLParser, main,          
-                 [CEGUI_LIBS="$CEGUI_LIBS -lCEGUITinyXMLParser"],       
-                 [echo "CEGUITinyXMLParser not found/not working, disabled."],          
-                 $OPENGL_LIBS   
-        )       
-                
-        AC_CHECK_LIB(CEGUIDevILImageCodec, main,        
-                 [
-                       CEGUI_LIBS="$CEGUI_LIBS -lCEGUIDevILImageCodec"
-                        AC_DEFINE([HAVE_LIBCEGUIDEVILIMAGECODEC],[1],Define to 1 to use DevIL codec)
-                 ],
-                 [echo "CEGUIDevILImageCodec not found/not working, disabled."],        
-                 $OPENGL_LIBS   
-        )       
-                
-        AC_CHECK_LIB(CEGUITGAImageCodec, createImageCodec,      
-                 [
-                         CEGUI_LIBS="$CEGUI_LIBS -lCEGUITGAImageCodec"
-                         AC_DEFINE(HAVE_LIBCEGUITGAIMAGECODEC,[1],Define to 1 to use the TGA codec)
-                 ],
-                 [echo "GUITGAImageCodec not found/not working, disabled."],    
-                 $OPENGL_LIBS   
-        )       
-                
-        libssilly="$OPENGL_LIBS -lpng"          
-        AC_CHECK_LIB(CEGUISILLYImageCodec, createImageCodec,    
-                 [
-                        CEGUI_LIBS="$CEGUI_LIBS -lCEGUISILLYImageCodec"
-                        AC_DEFINE([HAVE_LIBCEGUISILLYIMAGECODEC],[1],Define to 1 to use SILLY codec)
-                 ],
-                 [echo "CEGUISILLYImageCodec not found/not working, disabled."],        
-                 $libssilly     
-        )       
-        # Restore the libs
-        LIBS="$libstemp"        
-        echo "CEGUI_LIBS : $CEGUI_LIBS"         
-        fi
-
-AC_SUBST(CEGUI_CFLAGS)
-AC_SUBST(CEGUI_LIBS)
-
-AM_CONDITIONAL(GUI_SDL, [test "x$sdl" = "xyes" -a "x$cegui" = "xyes" -a "x$opengl" = "xyes" -a "x$glc" = "xyes" -a "x$xmu" = "xyes" ])
-AM_CONDITIONAL(GRAPHICS_OPENGL, [test "x$opengl" = "xyes" -a "x$glc" = "xyes" ])
-
-AC_ARG_ENABLE(gui-clutter, [  --disable-gui-clutter             don't create gui clutter ], MODULE_GUI_CLUTTER=$enableval, MODULE_GUI_CLUTTER=yes)
-if test "x$MODULE_GUI_CLUTTER" = "xyes"; then
-       PKG_CHECK_MODULES(CLUTTER, [clutter-0.8], [clutter_pkgconfig=yes], [clutter_pkgconfig=no])
-       if test "x$clutter_pkgconfig" = "xyes"; then
-               AC_DEFINE(HAVE_CLUTTER, 1, [Define to 1 if you have clutter])
-       fi
 fi
 
-AC_SUBST(CLUTTER_CFLAGS)
-AC_SUBST(CLUTTER_LIBS)
-AM_CONDITIONAL(GUI_CLUTTER, [test "x$clutter_pkgconfig" = "xyes" -a "x$glc" = "xyes" ])
-       
-
-if test x"${USE_GYPSY}" = xyes
-then
-       PKG_CHECK_MODULES(GYPSY, gypsy, use_gypsy=yes, use_gypsy=no)
-       AC_SUBST(GYPSY_CFLAGS)
-       AC_SUBST(GYPSY_LIBS)
-fi
-AM_CONDITIONAL(VEHICLE_GYPSY, [test "x$use_gypsy" = "xyes"])
+AM_CONDITIONAL(GUI_SDL, [test "x$sdl" = "xyes" -a "x$opengl" = "xyes" -a "x$glc" = "xyes" -a "x$xmu" = "xyes" ])
+AM_CONDITIONAL(GRAPHICS_OPENGL, [test "x$glut" = "xyes" - "x$opengl" = "xyes" -a "x$glc" = "xyes" ])
 
-if test x"${USE_LIBGPS}" = xyes
-then
-       AC_CHECK_HEADER(gps.h, AC_DEFINE([HAVE_LIBGPS],[],Define to 1 if you have the <gps.h> header file.) GPSD_LIBS="-lgps" gpsd=yes,  AC_MSG_WARN([*** no gps.h -- gpsd support disabled]))
-fi
-AC_SUBST(GPSD_CFLAGS)
-AC_SUBST(GPSD_LIBS)
-AM_CONDITIONAL(VEHICLE_GPSD, [test "x$gpsd" = "xyes"])
 
 if test x"${USE_GARMIN}" = xyes
 then
@@ -447,16 +383,10 @@ then
 fi
        AM_CONDITIONAL(HAVELIBGARMIN, [test "x$use_libgarmin" = "xyes"])
 
-
-# binding python
-AC_ARG_ENABLE(binding-python, [  --disable-binding-python             don't create binding python], enable_binding_python=$enableval, enable_binding_python=yes)
-if test "x${enable_binding_python}" = "xyes" ; then
-       if test "x${cross_compiling}" = "xyes" ; then
-               AC_MSG_WARN([*** cross compiling, support for python disabled])
-               enable_binding_python="no"
-       fi
-fi
-if test "x${enable_binding_python}" = "xyes"; then
+## binding
+# python
+AC_ARG_ENABLE(binding-python, [  --disable-binding-python             don't create binding python], binding_python=$enableval;binding_python_reason="configure parameter")
+if test "x${binding_python}" = "xyes"; then
        AC_PATH_PROG(_PATH_PYTHON,[python])
        dnl Libraries and flags for embedded Python.
        dnl FIXME: I wish there was a less icky way to get this.
@@ -464,7 +394,8 @@ if test "x${enable_binding_python}" = "xyes"; then
                AC_MSG_CHECKING(for Python linkage)
                py_prefix=`$_PATH_PYTHON -c 'import sys; print sys.prefix'`
                py_ver=`$_PATH_PYTHON -c 'import sys; print sys.version[[:3]]'`
-               py_libdir="${py_prefix}/lib/python${py_ver}"
+               py_lib=`$_PATH_PYTHON -c 'import sys; print sys.lib'`
+               py_libdir="${py_prefix}/${py_lib}/python${py_ver}"
                PYTHON_CFLAGS="-I${py_prefix}/include/python${py_ver}"
                if test -f $py_libdir/config/Makefile -a -f $py_prefix/include/python${py_ver}/Python.h; then
                        py_libs=`grep '^LIBS=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
@@ -476,45 +407,60 @@ if test "x${enable_binding_python}" = "xyes"; then
                        PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/[ \\t]*/ /g'`
                        AC_MSG_RESULT($py_libdir)
                else
-                       AC_MSG_WARN([$py_libdir/config/Makefile or $py_prefix/include/python${py_ver}/Python.h missing, support for python disabled])
-                       enable_binding_python="no"
+                       binding_python="no"
+                       binding_python_reason="$py_libdir/config/Makefile or $py_prefix/include/python${py_ver}/Python.h missing"
                fi
        else
-               AC_MSG_WARN([no python found, support for python disabled])
-               enable_binding_python="no"
+               binding_python="no"
+               binding_python_reason="python executable missing"
        fi
 fi
-if test "x${enable_binding_python}" = xyes ; then
+if test "x${binding_python}" = xyes ; then
        AC_DEFINE(USE_BINDING_PYTHON, 1, [Build with binding python])
-       AC_SUBST(PYTHON_CFLAGS)
-       AC_SUBST(PYTHON_LIBS)
 fi
-AM_CONDITIONAL(USE_BINDING_PYTHON, test "x${enable_binding_python}" = "xyes")
+AC_SUBST(PYTHON_CFLAGS)
+AC_SUBST(PYTHON_LIBS)
+AM_CONDITIONAL(BINDING_PYTHON, test "x${binding_python}" = "xyes")
 
-# binding dbus
-AC_ARG_ENABLE(binding-dbus,   [  --disable-binding-dbus               don't create binding dbus], enable_binding_dbus=$enableval, enable_binding_dbus=yes)
-if test "x${enable_binding_dbus}" = "xyes" ; then
-       PKG_CHECK_MODULES(DBUS, [dbus-glib-1], ,enable_binding_dbus=no)
+# dbus
+AC_ARG_ENABLE(binding-dbus,   [  --disable-binding-dbus               don't create binding dbus], binding_dbus=$enableval;binding_dbus_reason="configure parameter")
+if test "x${binding_dbus}" = "xyes" ; then
+       PKG_CHECK_MODULES(DBUS, [dbus-glib-1], ,binding_dbus=no)
 fi
-if test "x${enable_binding_dbus}" = "xyes" ; then
+if test "x${binding_dbus}" = "xyes" ; then
        AC_DEFINE(USE_BINDING_DBUS, 1, [Build with binding dbus])
-       AC_SUBST(DBUS_CFLAGS)
-       AC_SUBST(DBUS_LIBS)
 fi
-AM_CONDITIONAL(USE_BINDING_DBUS, test "x${enable_binding_dbus}" = "xyes")
+AC_SUBST(DBUS_CFLAGS)
+AC_SUBST(DBUS_LIBS)
+AM_CONDITIONAL(BINDING_DBUS, test "x${binding_dbus}" = "xyes")
 
 # svg
 AC_ARG_ENABLE(svg, [  --disable-svg        disable Scalable Vector Graphics], enable_svg=$enableval, enable_svg=yes)
 AC_ARG_ENABLE(svg2png, [  --disable-svg2png        disable conversion of svgs to pngs], enable_svg2png=$enableval, enable_svg2png=yes)
-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")
+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")
+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="")
+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="")
+AC_ARG_WITH(svg2png-use-convert, [  --with-svg2png-use-convert   use imagemagick's convert for png creation], SVG2PNG_CONVERTER="convert")
+AC_ARG_WITH(svg2png-use-rsvg-convert, [  --with-svg2png-use-rsvg-convert   use librsvg's rsvg-convert for png creation], SVG2PNG_CONVERTER="rsvg-convert")
+AC_ARG_WITH(svg2png-use-inkscape, [  --with-svg2png-use-inkscape   use inkscapes internal convert routines for png creation], SVG2PNG_CONVERTER="inkscape")
+AC_ARG_WITH(svg2png-use-ksvgtopng4, [  --with-svg2png-use-ksvgtopng4   use kde4's ksvgtopng4 for png creation], SVG2PNG_CONVERTER="ksvgtopng4")
+AC_ARG_WITH(svg2png-use-ksvgtopng, [  --with-svg2png-use-ksvgtopng   use kde3's convert for png creation], SVG2PNG_CONVERTER="ksvgtopng")
 if test "x${enable_svg2png}" = "xyes" ; then
-       AC_PATH_PROG([KSVGTOPNG], [ksvgtopng], [])
-       if test ! -x "$KSVGTOPNG"; then
-           enable_svg2png="no"
-        fi
+    if test "x${SVG2PNG_CONVERTER}" = "x"; then
+        SVG2PNG_CONVERTER="ksvgtopng ksvgtopng4 rsvg-convert inkscape convert"
+    fi
+    AC_PATH_PROGS([SVG2PNG], "${SVG2PNG_CONVERTER}", [none])
+    if test "x${SVG2PNG}" = "xnone"; then
+        enable_svg2png="no"
+    fi
 fi
+AC_SUBST(SVG2PNG)
 AC_SUBST(SVG2PNG_SCALES)
+AC_SUBST(SVG2PNG_SCALES_FLAG)
+AC_SUBST(SVG2PNG_SCALES_NAV)
 AM_CONDITIONAL(USE_SVG2PNG_SCALES, test "x${SVG2PNG_SCALES}" != "xyes" -a "x${SVG2PNG_SCALES}" != "x")
+AM_CONDITIONAL(USE_SVG2PNG_SCALES_FLAG, test "x${SVG2PNG_SCALES_FLAG}" != "xyes" -a "x${SVG2PNG_SCALES_FLAG}" != "x")
+AM_CONDITIONAL(USE_SVG2PNG_SCALES_NAV, test "x${SVG2PNG_SCALES_NAV}" != "xyes" -a "x${SVG2PNG_SCALES_NAV}" != "x")
 AM_CONDITIONAL(USE_SVG2PNG, test "x${enable_svg2png}" = "xyes")
 AM_CONDITIONAL(USE_SVG, test "x${enable_svg}" = "xyes")
 
@@ -528,11 +474,12 @@ AC_ARG_ENABLE(nls,
 INTLIBS=""
 MOFILES=""
 POFILES=""
+POIFILES=""
 LINGUAS=""
 
-if test x$enable_nls = xyes; then
+if test "x$enable_nls" = "xyes"; then
 
-  AC_CHECK_FUNC(gettext, [HAVEGETTEXT="yes"], 
+  AC_CHECK_FUNC(gettext, [HAVEGETTEXT="yes"] 
             AC_CHECK_LIB(intl, gettext, [INTLIBS="-lintl" HAVEGETTEXT="yes"],
                         INTLIBS="" ))
 
@@ -550,9 +497,9 @@ if test x$enable_nls = xyes; then
   if test "$XGETTEXT" != "" -a "$HAVEGETTEXT" != ""; then
      PO=""
      if test "$LINGUAS" = ""; then
-           ling=` (cd $srcdir/po; /bin/ls *.po) `
+           ling=` (cd $srcdir/po; /bin/ls *.po.in) `
           for l in $ling; do
-               lcode=`basename $l .po`
+               lcode=`basename $l .po.in`
                LINGUAS="$LINGUAS$lcode "
            done
     fi
@@ -562,6 +509,7 @@ if test x$enable_nls = xyes; then
    LINGUAS=""
    PO=""
    echo "xgettext and libintl.a don't both exist; will not build i18n support"
+   enable_nls = no
  fi
  for lang in $LINGUAS; do
     MOFILES="$MOFILES $lang.mo"
@@ -569,16 +517,33 @@ if test x$enable_nls = xyes; then
  for lang in $LINGUAS; do
     POFILES="$POFILES $lang.po"
  done
-fi
-
+ for lang in $LINGUAS; do
+    POIFILES="$POIFILES $lang.po.in"
+ done
 
 AC_SUBST(INTLIBS)
 AC_SUBST(MOFILES)
 AC_SUBST(POFILES)
+AC_SUBST(POIFILES)
 AM_GNU_GETTEXT_VERSION
-AM_GNU_GETTEXT
+AM_GNU_GETTEXT(no-libtool, need-ngettext, \$(top_builddir)/intl/)
+AC_SUBST(LIBINTL)
+AC_SUBST(LTLIBINTL)
+if test x"$LIBINTL" != "x" ;then
+       CFLAGS="$CFLAGS -I\$(top_builddir)/intl/"
+fi
 
-LIBS="$LIBS -lm -rdynamic"
+fi
+AM_CONDITIONAL(ENABLE_NLS, [test "x$enable_nls" = "xyes"])
+AC_CHECK_HEADER(
+       byteswap.h,
+       AC_DEFINE(
+               [HAVE_BYTESWAP_H],
+               [1],
+               [Define to 1 if you have byteswap.h],
+               )
+               ,
+)
 
 PACKAGE=navit
 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
@@ -586,28 +551,28 @@ AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
 AC_SUBST(PACKAGE)
 AC_SUBST(VERSION)
 
-if test "x${cross_compiling}" = "xyes"; then
-  AC_MSG_CHECKING([for a C compiler for build tools])
-  AC_CHECK_PROGS(CC_FOR_BUILD, gcc cc)
-else
-  CC_FOR_BUILD=$CC
-fi
-CCLD_FOR_BUILD="$CC_FOR_BUILD"
-
-AC_SUBST(cross_compiling)
-AC_SUBST(CC_FOR_BUILD)
-AC_SUBST(CCLD_FOR_BUILD)
-
 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")
 AM_CONDITIONAL(SUPPORT_WORDEXP, [test "x$wordexp_h" = "xno"])
 
 AC_CANONICAL_HOST
 win32=no
+win32ce=no
 case $host_os in
 wince)
        win32=yes
-       AC_DEFINE(HAS_WIN32_CE, 1, [Has Windows CE API])
+       win32ce=yes
+       AC_DEFINE(HAVE_API_WIN32_BASE, 1, [Have Windows Base API])
+       AC_DEFINE(HAVE_API_WIN32_CE, 1, [Have Windows CE API])
+       gui_win32=yes; gui_win32_reason="host_os is wince"
+       graphics_win32=yes; graphics_win32_reason="host_os is wince"
+       vehicle_wince=yes; vehcile_wince_reason="host_os is wince"
        ;;
+mingw32)
+       win32=yes
+       AC_DEFINE(HAVE_API_WIN32_BASE, 1, [Have Windows Base API])
+       AC_DEFINE(HAVE_API_WIN32, 1, [Have Windows API])
+       gui_win32=yes; gui_win32_reason="host_os is mingw32"
+       graphics_win32=yes; graphics_win32_reason="host_os is mingw32"
 esac
 if test "x$win32" = "xyes"
 then
@@ -615,11 +580,121 @@ then
        NAVIT_LIBS="$NAVIT_LIBS -L\$(top_builddir)/navit/support/win32 -lsupport_win32"
 fi
 AM_CONDITIONAL(SUPPORT_WIN32, [test "x$win32" = "xyes"])
+AM_CONDITIONAL(SUPPORT_WIN32CE, [test "x$win32ce" = "xyes"])
+
+LIBS="$LIBS -lm"
+if test "$win32" == "no"; then
+       LIBS="$LIBS -rdynamic"
+fi
 
-NAVIT_CFLAGS="$NAVIT_CFLAGS -I\$(top_srcdir)/intl"
-NAVIT_LIBS="$NAVIT_LIBS -L\$(top_builddir)/intl"
+support_libc=no
+AC_ARG_ENABLE(support_libc, [  --enable-support-libc enable builtin mini libc ], support_libc=$enableval)
+AM_CONDITIONAL(SUPPORT_LIBC, [test "x$support_libc" = "xyes"])
+if test "x$support_libc" = "xyes"; then
+       CFLAGS="$CFLAGS -I\$(top_srcdir)/navit/support/libc"
+fi
+
+## graphics
+# gd
+AC_ARG_ENABLE(graphics-gd, [  --enable-graphics-gd                enable graphics type gd], graphics_gd=$enableval;graphics_gd_reason="configure parameter")
+if test "x${graphics_gd}" = "xyes" ; then
+       if test -z "$GDLIB_CONFIG"; then
+            AC_PATH_PROG([GDLIB_CONFIG], [gdlib-config], [])
+        fi
+       AC_MSG_CHECKING([for gdlib with $GDLIB_CONFIG])
+       if test ! -x "$GDLIB_CONFIG"; then
+           if test "x${GDLIB_CONFIG}" = "x" ; then
+                graphics_gd_reason="$GDLIB_CONFIG not executable"
+           else
+                graphics_gd_reason="gdlib-config missing"
+            fi
+           graphics_gd=no 
+            AC_MSG_RESULT([no])
+       else
+           GD_CFLAGS="-I`$GDLIB_CONFIG --includedir`"
+           GD_LIBS="-L`$GDLIB_CONFIG --libdir` -lgd `$GDLIB_CONFIG --libs`"
+           AC_SUBST(GD_CFLAGS)
+           AC_SUBST(GD_LIBS)
+            AC_MSG_RESULT([yes])
+               fi 
+fi
+AM_CONDITIONAL(GRAPHICS_GD, test "x${graphics_gd}" = "xyes")
+# gtk_drawing_area
+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")
+AM_CONDITIONAL(GRAPHICS_GTK_DRAWING_AREA, [test "x${graphics_gtk_drawing_area}" = "xyes"])
+# win32
+AC_ARG_ENABLE(graphics-win32, [  --disable-graphics-win32            disable graphics type win32], graphics_win32=$enableval;graphics_win32_reason="configure parameter")
+AM_CONDITIONAL(GRAPHICS_WIN32, test "x${graphics_win32}" = "xyes")
+# qt_qpainter
+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")
+if test "x${graphics_qt_qpainter}" = "xyes" -a "x${QT_GUI_CFLAGS}" = "x" -a "x${QT_GUI_LIBS}" = "x"; then
+       PKG_CHECK_MODULES(QT_GUI, [QtGui QtCore], ,graphics_qt_qpainter=no,graphics_qt_qpainter_reason="Packages QtGui and/or QtCore missing")
+fi
+if test "x${graphics_qt_qpainter}" = "xyes" ; then
+       AC_DEFINE(USE_GRAPICS_QT_QPAINTER, 1, [Build with graphics qt_qpainter])
+fi
+AC_SUBST(QT_GUI_CFLAGS)
+AC_SUBST(QT_GUI_LIBS)
+AM_CONDITIONAL(GRAPHICS_QT_QPAINTER, test "x${graphics_qt_qpainter}" = "xyes")
+
+## gui
+# gtk
+AC_ARG_ENABLE(gui-gtk, [  --disable-gui-gtk                   disable gui type gtk ], gui_gtk=$enableval)
+AM_CONDITIONAL(GUI_GTK, [test "x${gui_gtk}" = "xyes"])
+# internal
+AC_ARG_ENABLE(gui-internal, [  --disable-gui-internal              disable gui type internal], gui_internal=$enableval;gui_internal_reason="configure parameter")
+AM_CONDITIONAL(GUI_INTERNAL, test "x${gui_internal}" = "xyes")
+# win32
+AC_ARG_ENABLE(gui-win32, [  --disable-gui-win32                 disable gui type win32], gui_win32=$enableval;gui_win32_reason="configure parameter")
+AM_CONDITIONAL(GUI_WIN32, test "x${gui_win32}" = "xyes")
+
+## speech
+# cmdline
+AC_ARG_ENABLE(speech-cmdline, [  --disable-speech-cmdline            disable speech type cmdline], speech_cmdline=$enableval;speech_cmdline_reason="configure parameter")
+AM_CONDITIONAL(SPEECH_CMDLINE, test "x${speech_cmdline}" = "xyes")
+# cmdline
+AC_ARG_ENABLE(speech-speechd, [  --disable-speech-speech-dispatcher  disable speech type speech-dispatcher], speech_speech_dispatcher=$enableval;speech_speech_dispatcher_reason="configure parameter")
+if test "x$speech_speech_dispatcher" = "xyes"; then
+       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")
+fi
+AC_SUBST(SPEECHD_CFLAGS)
+AC_SUBST(SPEECHD_LIBS)
+AM_CONDITIONAL(SPEECH_SPEECH_DISPATCHER, test "x${speech_speech_dispatcher}" = "xyes")
+
+## vehicle
+# demo
+AC_ARG_ENABLE(vehicle-demo, [  --disable-vehicle-demo              disable vehicle type demo], vehicle_demo=$enableval;vehicle_demo_reason="configure parameter")
+AM_CONDITIONAL(VEHICLE_DEMO, test "x${vehicle_demo}" = "xyes")
+# file
+AC_ARG_ENABLE(vehicle-file, [  --disable-vehicle-file              disable vehicle type file], vehicle_file=$enableval;vehicle_file_reason="configure parameter")
+AM_CONDITIONAL(VEHICLE_FILE, test "x${vehicle_file}" = "xyes")
+# gpsd
+AC_ARG_ENABLE(vehicle-gpsd, [  --disable-vehicle-gpsd              disable vehicle type gpsd], vehicle_gpsd=$enableval;vehicle_gpsd_reason="configure parameter")
+if test "x${vehicle_gpsd}" = xyes
+then
+       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" )
+fi
+AC_SUBST(GPSD_CFLAGS)
+AC_SUBST(GPSD_LIBS)
+AM_CONDITIONAL(VEHICLE_GPSD, [test "x${vehicle_gpsd}" = "xyes"])
+# gypsy
+AC_ARG_ENABLE(vehicle-gypsy,[  --disable-vehicle-gypsy             disable vehicle type gypsy], vehicle_gypsy=$enableval;vehicle_gypsy_reason="configure parameter")
+if test "x${vehicle_gypsy}" = "xyes"
+then
+       PKG_CHECK_MODULES(GYPSY, gypsy, ,vehicle_gypsy=no;vehicle_gypsy_reason="package gypsy missing")
+fi
+AC_SUBST(GYPSY_CFLAGS)
+AC_SUBST(GYPSY_LIBS)
+AM_CONDITIONAL(VEHICLE_GYPSY, test "x${vehicle_gypsy}" = "xyes")
+# wince
+AC_ARG_ENABLE(vehicle-wince, [  --disable-vehicle-wince             disable vehicle type wince], vehicle_wince=$enableval;vehicle_wince_reason="configure parameter")
+AM_CONDITIONAL(VEHICLE_WINCE, test "x${vehicle_wince}" = "xyes")
+
+NAVIT_CFLAGS="$NAVIT_CFLAGS $GLIB_CFLAGS $GMODULE_CFLAGS"
+NAVIT_LIBS="$NAVIT_LIBS $GLIB_LIBS $GMODULE_LIBS $LIBINTL"
 AC_SUBST(NAVIT_CFLAGS)
 AC_SUBST(NAVIT_LIBS)
+AC_SUBST(WINDRES)
 
 AC_CONFIG_FILES([
 Makefile
@@ -627,30 +702,32 @@ navit/Makefile
 navit/binding/Makefile
 navit/binding/python/Makefile
 navit/binding/dbus/Makefile
-navit/data/Makefile
-navit/data/mg/Makefile
-navit/data/textfile/Makefile
-navit/data/binfile/Makefile
-navit/data/garmin/Makefile
-navit/data/poi_geodownload/Makefile
-navit/data/poi_geodownload/libmdb/Makefile
-navit/data/poi_geodownload/libmdb/include/Makefile
+navit/map/Makefile
+navit/map/mg/Makefile
+navit/map/textfile/Makefile
+navit/map/shapefile/Makefile
+navit/map/binfile/Makefile
+navit/map/garmin/Makefile
+navit/map/poi_geodownload/Makefile
+navit/map/poi_geodownload/libmdb/Makefile
+navit/map/poi_geodownload/libmdb/include/Makefile
 navit/fib-1.1/Makefile
+navit/font/Makefile
+navit/font/freetype/Makefile
+navit/fonts/Makefile
 navit/graphics/Makefile
+navit/graphics/gd/Makefile
 navit/graphics/gtk_drawing_area/Makefile
-navit/graphics/directfb/Makefile
 navit/graphics/cogl/Makefile
 navit/graphics/opengl/Makefile
 navit/graphics/null/Makefile
 navit/graphics/sdl/Makefile
 navit/graphics/qt_qpainter/Makefile
+navit/graphics/win32/Makefile
 navit/gui/Makefile
 navit/gui/gtk/Makefile
 navit/gui/internal/Makefile
-navit/gui/clutter/Makefile
-navit/gui/cegui/Makefile
-navit/gui/cegui/datafiles/Makefile
-navit/gui/directfb/Makefile
+navit/gui/win32/Makefile
 navit/osd/Makefile
 navit/osd/core/Makefile
 navit/speech/Makefile
@@ -659,6 +736,7 @@ navit/speech/speech_dispatcher/Makefile
 navit/support/Makefile
 navit/support/ezxml/Makefile
 navit/support/glib/Makefile
+navit/support/libc/Makefile
 navit/support/win32/Makefile
 navit/support/wordexp/Makefile
 navit/support/zlib/Makefile
@@ -667,6 +745,7 @@ navit/vehicle/file/Makefile
 navit/vehicle/gpsd/Makefile
 navit/vehicle/gypsy/Makefile
 navit/vehicle/demo/Makefile
+navit/vehicle/wince/Makefile
 navit/xpm/Makefile
 navit/maps/Makefile
 intl/Makefile
@@ -680,12 +759,6 @@ AC_OUTPUT
 echo ""
 echo ""
 echo "Summary of your installation :"
-if test x"$gtk2_pkgconfig" = xyes
-       then
-       echo "GTK gui     : ENABLED"
-       else
-       echo "GTK gui     : DISABLED : you are missing a dependency. To fix this install a package named gtk2-devel or libgtk2.0-dev"
-fi
 # FIXME : maybe elaborate missing dependencies
 if test x"$sdl" != xyes
        then
@@ -703,53 +776,18 @@ if test x"$glc" != xyes
         then
         sdl_failures=$sdl_failures"quesoglc "
 fi
-if test x"$cegui" != xyes
-        then
-        sdl_failures=$sdl_failures"cegui-devel >= 0.5 "
-fi
 if test -z "$sdl_failures"
         then
         echo "OpenGL gui  : ENABLED, with $CEGUI_LIBS"
         else
                 echo "OpenGL gui  : DISABLED : you are missing $sdl_failures"
 fi
-if test x"$directfb_pkgconfig" = xyes
-       then
-       echo "DIRECTFB    : ENABLED"
-       else
-       echo "DIRECTFB    : DISABLED"
-fi
-if test x"$clutter_pkgconfig" = xyes
-       then
-       echo "Clutter gui : ENABLED"
-       else 
-       echo "Clutter gui : DISABLED"
-fi
 if test x"$enable_hildon" = xyes
        then
         echo "Maemo/Hildon: ENABLED"
         else
         echo "Maemo/Hildon: DISABLED"
 fi
-
-if test x"$use_gypsy" = xyes
-       then
-       echo "Gypsy support: ENABLED"
-       else
-       echo "Gypsy support: DISABLED"
-fi
-if test x"$gpsd" = xyes
-       then
-       echo "GPSD support: ENABLED"
-       else
-       echo "GPSD support: DISABLED"
-fi
-if test x"$speechd" = xyes
-       then
-       echo "SPEECHD     : ENABLED"
-       else
-       echo "SPEECHD     : DISABLED"
-fi
 if test x"${USE_GARMIN}" = xyes
        then
        if test "x$use_libgarmin" = "xyes"
@@ -761,13 +799,45 @@ if test x"${USE_GARMIN}" = xyes
        else 
                echo "Garmin IMG  : DISABLED (you requested it)"
 fi
-if test "x$samplemap" = "xyes"
-       then
-       echo "Samplemap   : ENABLED"
-       else
-       echo "Samplemap   : DISABLED"
-fi
-if  [ test x"$gtk2_pkgconfig" != xyes ] && [ test x"$sdl" != xyes ] && [ test x"$directfb_pkgconfig" != xyes ]
+
+if test x"$LIBINTL" = "x" ;then
+       nls_libs="system gettext support"
+else
+       nls_libs="$LIBINTL"
+fi
+echo "Plugins:             $plugins ($plugins_reason)"
+echo "Postgresql:          $postgresql ($postgresql_reason)"
+echo "Samplemap:           $samplemap ($samplemap_reason)"
+echo "NLS Support:         $enable_nls ($nls_libs)"
+echo "Font renderers:"
+echo "  freetype:          $font_freetype ($font_freetype_reason)"
+echo "Graphics types:"
+echo "  gtk_drawing_area:  $graphics_gtk_drawing_area ($graphics_gtk_drawing_area_reason)"
+echo "  qt_qpainter:       $graphics_qt_qpainter ($graphics_qt_qpainter_reason)"
+echo "  win32:             $graphics_win32 ($graphics_win32_reason)"
+echo "  OpenGL:            $graphics_opengl ($graphics_opengl_reason)"
+echo "  gd:                $graphics_gd ($graphics_gd_reason)"
+
+echo "GUI types:"
+echo "  gtk:               $gui_gtk ($gui_gtk_reason)"
+echo "  internal:          $gui_internal ($gui_internal_reason)"
+echo "  win32:             $gui_win32 ($gui_win32_reason)"
+
+echo "Bindings:"
+echo "  dbus:              $binding_dbus ($binding_dbus_reason)"
+echo "  python:            $binding_python ($binding_python_reason)"
+
+echo "Speech types:"
+echo "  cmdline:           $speech_cmdline ($speech_cmdline_reason)"
+echo "  speech_dispatcher: $speech_speech_dispatcher ($speech_speech_dispatcher_reason)"
+
+echo "Vehicle types:"
+echo "  demo:              $vehicle_demo ($vehicle_demo_reason)"
+echo "  file:              $vehicle_file ($vehicle_file_reason)"
+echo "  gpsd:              $vehicle_gpsd ($vehicle_gpsd_reason)"
+echo "  gypsy:             $vehicle_gypsy ($vehicle_gypsy_reason)"
+echo "  wince:             $vehicle_wince ($vehicle_wince_reason)"
+
        then
        echo ""
        echo "" 
@@ -777,3 +847,4 @@ if  [ test x"$gtk2_pkgconfig" != xyes ] && [ test x"$sdl" != xyes ] && [ test x"
        echo "" 
        exit 1
 fi
+