debian/changelog update
[navit-package] / configure.in
index 3a1c142..c3f3a0f 100644 (file)
@@ -1,4 +1,5 @@
 AC_INIT(navit, 0.2.0)
+AC_CONFIG_MACRO_DIR([m4])
 SOURCE_MODE=svn
 
 AM_INIT_AUTOMAKE
@@ -50,11 +51,14 @@ graphics_sdl=yes; graphics_sdl_reason=default
 graphics_win32=no; graphics_win32_reason=default
 speech_android=no; speech_android_reason=default
 speech_cmdline=yes; speech_cmdline_reason=default
+speech_espeak=no; speech_espeak_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_gpsd_dbus=no; vehicle_gpsd_dbus_reason=default
 vehicle_gypsy=yes; vehicle_gypsy_reason=default
+vehicle_null=no; vehicle_null_reason=default
 vehicle_wince=no; vehicle_wince_reason=default
 vehicle_iphone=no; vehicle_iphone_reason=default
 vehicle_android=no; vehicle_android_reason=default
@@ -64,7 +68,7 @@ AC_CANONICAL_HOST
 win32=no
 win32ce=no
 case $host_os in
-wince)
+wince|mingw32ce|cegcc)
        win32=yes
        win32ce=yes
        AC_DEFINE(HAVE_API_WIN32_BASE, 1, [Have Windows Base API])
@@ -72,6 +76,8 @@ wince)
        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"
+       speech_espeak=yes; speech_espeak_reason="host_os is wince"
+       support_libpng=yes
        ;;
 mingw32)
        win32=yes
@@ -79,6 +85,9 @@ mingw32)
        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"
+       speech_espeak=yes; speech_espeak_reason="host_os is mingw32"
+       support_libpng=yes
+       LIBS="$LIBS -lwinmm"
        ;;
 linux*_android)
        android=yes
@@ -90,6 +99,7 @@ linux*_android)
        graphics_android=yes; graphics_android_reason="host_os is android"
        speech_android=yes; speech_android_reason="host_os is android"
        MODULE_LDFLAGS="-Xcompiler -nostdlib"
+       NAVIT_MODULE_LDFLAGS="$MODULE_LDFLAGS -L\$(top_builddir)/navit -lnavit"
        ;;
 esac
 if test "x$win32" = "xyes"
@@ -97,10 +107,21 @@ then
        NAVIT_CFLAGS="$NAVIT_CFLAGS -I\$(top_srcdir)/navit/support/win32"
        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"])
 AM_CONDITIONAL(SUPPORT_ANDROID, [test "x$android" = "xyes"])
+
+if test "x$support_libpng" = "xyes"
+then
+       NAVIT_CFLAGS="$NAVIT_CFLAGS -I\$(top_srcdir)/navit/support/libpng"
+       NAVIT_LIBS="$NAVIT_LIBS -L\$(top_builddir)/navit/support/libpng -lsupport_libpng"
+fi
+AM_CONDITIONAL(SUPPORT_LIBPNG, [test "x$support_libpng" = "xyes"])
+
 AC_SUBST(MODULE_LDFLAGS)
+AC_SUBST(NAVIT_MODULE_LDFLAGS)
 
 LIBS="$LIBS -lm"
 if test "$win32" == "no"; then
@@ -288,28 +309,21 @@ AC_MSG_CHECKING(for CreateProcess)
 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))
 
 AC_ARG_ENABLE(graphics-sdl, [  --disable-graphics-sdl             don't create graphics sdl], graphics_sdl=$enableval;graphics_sdl_reason="configure parameter")
+
 if test "x${graphics_sdl}" = "xyes" ; then
-       if test -z "$SDL_CONFIG"; then
-            AC_PATH_PROG([SDL_CONFIG], [sdl-config], [])
-        fi
-fi
-if test "x${graphics_sdl}" = "xyes" ; then
-        AC_MSG_CHECKING([for SDL libraries with $SDL_CONFIG])
-       if test ! -x "$SDL_CONFIG"; then
-           graphics_sdl = "no"
-           graphics_sdl_reason = "sdl-config not available"
-            AC_MSG_RESULT([no])
-       else
-           SDL_CFLAGS="`$SDL_CONFIG --cflags`"
-           SDL_LIBS="`$SDL_CONFIG --libs`"
-           AC_SUBST(SDL_CFLAGS)
-           AC_SUBST(SDL_LIBS)
-            AC_MSG_RESULT([yes])
-               fi 
+        PKG_CHECK_MODULES(SDL, 
+                          [sdl], 
+                          [graphics_sdl="yes"
+                           graphics_sdl_reason="sdl present"] , 
+                          [graphics_sdl="no"
+                           graphics_sdl_reason="sdl not available"]
+                         )
+        AC_SUBST(SDL_CFLAGS)
+        AC_SUBST(SDL_LIBS)
 fi
 if test "x${graphics_sdl}" = "xyes" ; then
        save_CPPFLAGS=$CPPFLAGS
-       CPPFLAGS="$($SDL_CONFIG --cflags) $CPPFLAGS"
+       CPPFLAGS="$SDL_CFLAGS $CPPFLAGS"
        AC_CHECK_HEADER(SDL_image.h,SDL_IMAGE_LIBS=-lSDL_image,graphics_sdl="no";graphics_sdl_reason="SDL_image.h missing")
        AC_SUBST(SDL_IMAGE_LIBS)
        CPPFLAGS=$save_CPPFLAGS
@@ -510,10 +524,15 @@ if test "x${binding_dbus}" = "xyes" ; then
 fi
 if test "x${binding_dbus}" = "xyes" ; then
        AC_DEFINE(USE_BINDING_DBUS, 1, [Build with binding dbus])
+       vehicle_gpsd_dbus="yes"
+       vehicle_gpsd_dbus_reason="dbus binding present"
 fi
 AC_SUBST(DBUS_CFLAGS)
 AC_SUBST(DBUS_LIBS)
 AM_CONDITIONAL(BINDING_DBUS, test "x${binding_dbus}" = "xyes")
+AM_CONDITIONAL(VEHICLE_GPSD_DBUS, test "x${vehicle_gpsd_dbus}" = "xyes")
+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")
+AC_SUBST(DBUS_SERVICE_DIR)
 
 # svg
 AC_ARG_ENABLE(svg, [  --disable-svg        disable Scalable Vector Graphics], enable_svg=$enableval, enable_svg=yes)
@@ -528,7 +547,7 @@ AC_ARG_WITH(svg2png-use-ksvgtopng4, [  --with-svg2png-use-ksvgtopng4   use kde4'
 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
     if test "x${SVG2PNG_CONVERTER}" = "x"; then
-        SVG2PNG_CONVERTER="ksvgtopng ksvgtopng4 rsvg-convert inkscape convert"
+        SVG2PNG_CONVERTER="rsvg-convert ksvgtopng ksvgtopng4 inkscape convert"
     fi
     AC_PATH_PROGS([SVG2PNG], ${SVG2PNG_CONVERTER}, [none])
     if test "x${SVG2PNG}" = "xnone"; then
@@ -548,6 +567,12 @@ AM_CONDITIONAL(USE_SVG, test "x${enable_svg}" = "xyes")
 # XSLTS
 AC_ARG_WITH(xslts, [  --with-xslts   enable processing of navit.xml with given xslt scripts], XSLTS=$withval, XSLTS="")
 AC_SUBST(XSLTS)
+AC_ARG_WITH(saxon, [ --with-saxon   specify the saxon xslt processor], SAXON=$withval, SAXON="saxon")
+AC_SUBST(SAXON)
+
+# Android Permissions
+AC_ARG_WITH(android-permissions, [  --with-android-permissions   Set additional android permissions], ANDROID_PERMISSIONS=$withval, ANDROID_PERMISSIONS="")
+AC_SUBST(ANDROID_PERMISSIONS)
 
 # NLS
 
@@ -641,6 +666,7 @@ AC_ARG_ENABLE(support_libc, [  --enable-support-libc enable builtin mini libc ],
 AM_CONDITIONAL(SUPPORT_LIBC, [test "x$support_libc" = "xyes"])
 if test "x$support_libc" = "xyes"; then
        CFLAGS="$CFLAGS -I\$(top_srcdir)/navit/support/libc"
+       LIBC_LIBS="-L\$(top_builddir)/navit/support/libc -lsupport_libc"
 fi
 
 ## graphics
@@ -715,14 +741,18 @@ AM_CONDITIONAL(SPEECH_ANDROID, test "x${speech_android}" = "xyes")
 # 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")
+# espeak
+AC_ARG_ENABLE(speech-espeak, [  --disable-speech-espeak            disable speech type espeak], speech_espeak=$enableval;speech_espeak_reason="configure parameter")
+AM_CONDITIONAL(SPEECH_ESPEAK, test "x${speech_espeak}" = "xyes")
+# speech-dispatcher
+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")
 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")
+AM_CONDITIONAL(SUPPORT_ESPEAK, test "x${support_espeak}" = "xyes")
 
 ## vehicle
 # android
@@ -752,6 +782,9 @@ fi
 AC_SUBST(GYPSY_CFLAGS)
 AC_SUBST(GYPSY_LIBS)
 AM_CONDITIONAL(VEHICLE_GYPSY, test "x${vehicle_gypsy}" = "xyes")
+# null
+AC_ARG_ENABLE(vehicle-null, [  --enable-vehicle-null             enable vehicle type null], vehicle_null=$enableval;vehicle_null_reason="configure parameter")
+AM_CONDITIONAL(VEHICLE_NULL, test "x${vehicle_null}" = "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")
@@ -769,6 +802,7 @@ NAVIT_LIBS="$NAVIT_LIBS $GLIB_LIBS $GMODULE_LIBS $LIBINTL"
 AC_SUBST(NAVIT_CFLAGS)
 AC_SUBST(NAVIT_LIBS)
 AC_SUBST(WORDEXP_LIBS)
+AC_SUBST(LIBC_LIBS)
 AC_SUBST(WINDRES)
 
 AC_CONFIG_FILES([
@@ -781,11 +815,13 @@ navit/map/Makefile
 navit/map/mg/Makefile
 navit/map/textfile/Makefile
 navit/map/shapefile/Makefile
+navit/map/filter/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/maptool/Makefile
 navit/fib-1.1/Makefile
 navit/font/Makefile
 navit/font/freetype/Makefile
@@ -808,11 +844,14 @@ navit/osd/core/Makefile
 navit/speech/Makefile
 navit/speech/android/Makefile
 navit/speech/cmdline/Makefile
+navit/speech/espeak/Makefile
 navit/speech/speech_dispatcher/Makefile
 navit/support/Makefile
+navit/support/espeak/Makefile
 navit/support/ezxml/Makefile
 navit/support/glib/Makefile
 navit/support/libc/Makefile
+navit/support/libpng/Makefile
 navit/support/win32/Makefile
 navit/support/wordexp/Makefile
 navit/support/zlib/Makefile
@@ -820,7 +859,9 @@ navit/vehicle/Makefile
 navit/vehicle/android/Makefile
 navit/vehicle/file/Makefile
 navit/vehicle/gpsd/Makefile
+navit/vehicle/gpsd_dbus/Makefile
 navit/vehicle/gypsy/Makefile
+navit/vehicle/null/Makefile
 navit/vehicle/demo/Makefile
 navit/vehicle/wince/Makefile
 navit/vehicle/iphone/Makefile
@@ -910,6 +951,7 @@ echo "  python:            $binding_python ($binding_python_reason)"
 echo "Speech types:"
 echo "  android:           $speech_android ($speech_android_reason)"
 echo "  cmdline:           $speech_cmdline ($speech_cmdline_reason)"
+echo "  espeak:            $speech_espeak ($speech_espeak_reason)"
 echo "  speech_dispatcher: $speech_speech_dispatcher ($speech_speech_dispatcher_reason)"
 
 echo "Vehicle types:"
@@ -917,7 +959,9 @@ echo "  android:           $vehicle_android ($vehicle_android_reason)"
 echo "  demo:              $vehicle_demo ($vehicle_demo_reason)"
 echo "  file:              $vehicle_file ($vehicle_file_reason)"
 echo "  gpsd:              $vehicle_gpsd ($vehicle_gpsd_reason)"
+echo "  gpsd_dbus:         $vehicle_gpsd_dbus ($vehicle_gpsd_dbus_reason)"
 echo "  gypsy:             $vehicle_gypsy ($vehicle_gypsy_reason)"
+echo "  null:              $vehicle_null ($vehicle_null_reason)"
 echo "  wince:             $vehicle_wince ($vehicle_wince_reason)"
 echo "  iphone:            $vehicle_iphone ($vehicle_iphone_reason)"