2 AC_CONFIG_MACRO_DIR([m4])
6 AM_CONFIG_HEADER(config.h)
9 AM_CONDITIONAL(SOURCE_MODE_SVN, [test "x${SOURCE_MODE}" = "xsvn"])
11 if test "x${SOURCE_MODE}" = "xsvn" ; then
12 USE_MAINTAINER_MODE=yes
14 USE_MAINTAINER_MODE=no
17 AC_DEFUN([AM_MAINTAINER_MODE],
18 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
19 dnl maintainer-mode is enabled by default (reason of inclusion of this function)
20 AC_ARG_ENABLE(maintainer-mode,
21 [ --enable-maintainer-mode enable make rules and dependencies not useful
22 (and sometimes confusing) to the casual installer],
23 USE_MAINTAINER_MODE=$enableval)
24 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
25 AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
26 MAINT=$MAINTAINER_MODE_TRUE
31 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
36 plugins=yes; plugins_reason=default
37 postgresql=yes; postgresql_reason=default
38 samplemap=yes; samplemap_reason=default
39 binding_dbus=yes; binding_dbus_reason=default
40 binding_python=yes; binding_python_reason=default
41 font_freetype=yes; font_freetype_reason=default
42 fontconfig=yes; fontconfig_reason=default
43 gui_gtk=no; gui_gtk_reason=default
44 gui_win32=no; gui_win32_reason=default
45 gui_internal=yes; gui_internal_reason=default
46 graphics_gd=no; graphics_gd_reason=default
47 graphics_gtk_drawing_area=no; graphics_gtk_drawing_area_reason=default
48 graphics_qt_qpainter=yes; graphics_qt_qpainter_reason=default
49 graphics_opengl=yes; graphics_opengl_reason=default
50 graphics_sdl=yes; graphics_sdl_reason=default
51 graphics_win32=no; graphics_win32_reason=default
52 speech_android=no; speech_android_reason=default
53 speech_cmdline=yes; speech_cmdline_reason=default
54 speech_espeak=no; speech_espeak_reason=default
55 speech_speech_dispatcher=yes; speech_speech_dispatcher_reason=default
56 vehicle_demo=yes; vehicle_demo_reason=default
57 vehicle_file=yes; vehicle_file_reason=default
58 vehicle_gpsd=yes; vehicle_gpsd_reason=default
59 vehicle_gpsd_dbus=no; vehicle_gpsd_dbus_reason=default
60 vehicle_gypsy=yes; vehicle_gypsy_reason=default
61 vehicle_null=no; vehicle_null_reason=default
62 vehicle_wince=no; vehicle_wince_reason=default
63 vehicle_iphone=no; vehicle_iphone_reason=default
64 vehicle_android=no; vehicle_android_reason=default
65 graphics_android=no; graphics_android_reason=default
71 wince|mingw32ce|cegcc)
74 AC_DEFINE(HAVE_API_WIN32_BASE, 1, [Have Windows Base API])
75 AC_DEFINE(HAVE_API_WIN32_CE, 1, [Have Windows CE API])
76 gui_win32=yes; gui_win32_reason="host_os is wince"
77 graphics_win32=yes; graphics_win32_reason="host_os is wince"
78 vehicle_wince=yes; vehcile_wince_reason="host_os is wince"
79 speech_espeak=yes; speech_espeak_reason="host_os is wince"
84 AC_DEFINE(HAVE_API_WIN32_BASE, 1, [Have Windows Base API])
85 AC_DEFINE(HAVE_API_WIN32, 1, [Have Windows API])
86 gui_win32=yes; gui_win32_reason="host_os is mingw32"
87 graphics_win32=yes; graphics_win32_reason="host_os is mingw32"
88 speech_espeak=yes; speech_espeak_reason="host_os is mingw32"
94 AC_DEFINE(HAVE_API_ANDROID, 1, [Have Android API])
95 echo "void dl_unwind_find_exidx(void) {}" >crt0.c
98 vehicle_android=yes; vehicle_android_reason="host_os is android"
99 graphics_android=yes; graphics_android_reason="host_os is android"
100 speech_android=yes; speech_android_reason="host_os is android"
101 MODULE_LDFLAGS="-Xcompiler -nostdlib"
102 NAVIT_MODULE_LDFLAGS="$MODULE_LDFLAGS -L\$(top_builddir)/navit -lnavit"
105 if test "x$win32" = "xyes"
107 NAVIT_CFLAGS="$NAVIT_CFLAGS -I\$(top_srcdir)/navit/support/win32"
108 NAVIT_LIBS="$NAVIT_LIBS -L\$(top_builddir)/navit/support/win32 -lsupport_win32"
112 AM_CONDITIONAL(SUPPORT_WIN32, [test "x$win32" = "xyes"])
113 AM_CONDITIONAL(SUPPORT_WIN32CE, [test "x$win32ce" = "xyes"])
114 AM_CONDITIONAL(SUPPORT_ANDROID, [test "x$android" = "xyes"])
116 if test "x$support_libpng" = "xyes"
118 NAVIT_CFLAGS="$NAVIT_CFLAGS -I\$(top_srcdir)/navit/support/libpng"
119 NAVIT_LIBS="$NAVIT_LIBS -L\$(top_builddir)/navit/support/libpng -lsupport_libpng"
121 AM_CONDITIONAL(SUPPORT_LIBPNG, [test "x$support_libpng" = "xyes"])
123 AC_SUBST(MODULE_LDFLAGS)
124 AC_SUBST(NAVIT_MODULE_LDFLAGS)
127 if test "$win32" == "no"; then
128 LIBS="$LIBS -rdynamic"
131 m4_ifndef([AC_USE_SYSTEM_EXTENSIONS],
132 [AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], [AC_GNU_SOURCE])])
134 AC_USE_SYSTEM_EXTENSIONS
139 if eval "test x`uname` = xDarwin"; then
140 CFLAGS="$CFLAGS -I/opt/local/include -L/opt/local/lib"
142 if eval "test x$GCC = xyes"; then
143 CFLAGS="$CFLAGS -Wall -Wcast-align -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wreturn-type -D_GNU_SOURCE"
148 if eval "test x$GXX = xyes"; then
149 CXXFLAGS="$CXXFLAGS -Wall -Wcast-align -Wpointer-arith -Wreturn-type -D_GNU_SOURCE"
153 if test "x${cross_compiling}" = "xyes"; then
154 samplemap="no";samplemap_reason="not supported for cross compiling"
155 binding_python="no";binding_python_reason="not supported for cross compiling"
156 postgresql="no";postgresql_reason="not supported for cross compiling"
157 AC_MSG_CHECKING([for a C compiler for build tools])
158 AC_CHECK_PROGS(CC_FOR_BUILD, gcc cc)
162 CCLD_FOR_BUILD="$CC_FOR_BUILD"
163 AC_SUBST(cross_compiling)
164 AC_SUBST(CC_FOR_BUILD)
165 AC_SUBST(CCLD_FOR_BUILD)
168 # defines WORDS_BIGENDIAN for big-endian systems
171 AC_ARG_ENABLE(variant, [ --enable-variant=something set variant], NAVIT_VARIANT=$enableval)
172 AC_SUBST(NAVIT_VARIANT)
174 AC_ARG_ENABLE(cache-size, [ --enable-cache-size=size in bytes set cache size], AC_DEFINE_UNQUOTED(CACHE_SIZE,[${enableval}], [Size of Cache in Bytes]))
176 AC_ARG_ENABLE(avoid-unaligned, [ --enable-avoid-unaligned avoid unaligned accesses], AVOID_UNALIGNED=$enableval, AVOID_UNALIGNED=no)
177 test x"${AVOID_UNALIGNED}" = xyes && AC_DEFINE(AVOID_UNALIGNED,[],Define to avoid unaligned access)
179 AC_ARG_ENABLE(avoid-float, [ --enable-avoid-float avoid floating point calculations], AVOID_FLOAT=$enableval, AVOID_FLOAT=no)
180 test x"${AVOID_FLOAT}" = xyes && AC_DEFINE(AVOID_FLOAT,[],Define to avoid floating point)
182 AC_ARG_ENABLE(transformation-roll, [ --enable-transformation-roll add support for specifying roll angle in transformation], ENABLE_ROLL=$enableval, ENABLE_ROLL=no)
183 test x"${ENABLE_ROLL}" = xyes && AC_DEFINE(ENABLE_ROLL,[],Define to add support for specifying roll angle in transformation)
185 AC_ARG_ENABLE(hildon, [ --disable-hildon build without maemo/hildon support], enable_hildon=$enableval, enable_hildon=yes)
186 if test "x${enable_hildon}" = "xyes" ; then
187 PKG_CHECK_MODULES(HILDON, hildon-1 >= 0.9.9, , [
191 PKG_CHECK_MODULES(GPSBT, gpsbt, [
192 AC_DEFINE(HAVE_GPSBT, 1, [Have the gpsbt library])
193 AC_SUBST(GPSBT_CFLAGS)
198 if test x"${enable_hildon}" = xyes ; then
199 AC_DEFINE(USE_HILDON, 1, [Build with maemo/hildon support])
200 AC_SUBST(HILDON_CFLAGS)
201 AC_SUBST(HILDON_LIBS)
204 AM_CONDITIONAL(USE_HILDON, test "${enable_hildon}" = "xyes")
206 AC_ARG_ENABLE(garmin, [ --disable-garmin disable garmin support], USE_GARMIN=$enableval, USE_GARMIN=yes)
209 AC_PATH_PROG(_PATH_BZCAT,[bzcat])
210 if test "x${_PATH_BZCAT}" = "x" ; then
211 samplemap=no; samplemap_reason="bzcat missing"
213 AC_ARG_ENABLE(samplemap, [ --disable-samplemap don't build the samplemap], samplemap=$enableval;samplemap_reason="configure parameter")
214 AM_CONDITIONAL(BUILD_SAMPLEMAP, [test "x$samplemap" = "xyes"])
216 AC_ARG_ENABLE(fastmath, [ --disable-fastmath don't build with fastmath], fastmath=$enableval, fastmath=yes)
217 AM_CONDITIONAL(FASTMATH, [test "x$fastmath" = "xyes"])
219 if test x"$fastmath" = xyes; then
220 if eval "test x$GCC = xyes"; then
221 CFLAGS="$CFLAGS -ffast-math"
225 X_CFLAGS="-I$x_includes"
226 AS_IF([test -n "$ac_x_libraries"], [X_LIBS="-L$ac_x_libraries"])
229 AC_ARG_ENABLE(glib, [ --disable-glib don't build with external glib], glib=$enableval, glib=yes)
230 if test x"${glib}" = "xyes"; then
231 PKG_CHECK_MODULES(GLIB, [glib-2.0 gthread-2.0], [glib=yes],[glib=no])
233 if test "x${glib}" = "xyes"; then
234 AC_DEFINE(HAVE_GLIB, 1, [Define to 1 if you have (external) glib library])
236 GLIB_CFLAGS="-I\$(top_srcdir)/navit/support -I\$(top_srcdir)/navit/support/glib -I\$(top_srcdir)/navit/support/ezxml"
237 GLIB_LIBS="-L\$(top_builddir)/navit/support/glib -lsupport_glib -L\$(top_builddir)/navit/support/ezxml -lsupport_ezxml"
241 AC_ARG_ENABLE(gmodule, [ --disable-gmodule don't build with gmodule], gmodule=$enableval, gmodule=yes)
242 if test x"${gmodule}" = "xyes"; then
243 PKG_CHECK_MODULES(GMODULE, [gmodule-2.0], [gmodule=yes], [gmodule=no])
245 if test "x${gmodule}" = "xyes"; then
246 AC_DEFINE(HAVE_GMODULE, 1, [Define to 1 if you have gmodule])
248 AC_CHECK_LIB(dl, dlopen,
249 [plugins_reason="default, via dlopen";GMODULE_LIBS="-ldl";AC_DEFINE(HAVE_DLOPEN, 1, [Define to 1 if you have dlopen])],
250 [plugins="no"; plugins_reason="package gmodule and dlopen missing"]
254 AC_ARG_ENABLE(plugins, [ --disable-plugins disable plugins], [ plugins=$enableval;plugin_reason="configure parameter" ])
255 if test "x${plugins}" = "xyes"; then
261 Define to 1 if you have plugins.
267 AM_CONDITIONAL(PLUGINS, [test "x$plugins" = "xyes"])
270 AM_CONDITIONAL(EVENT_GLIB, [test "x$glib" = "xyes"])
271 AM_CONDITIONAL(SUPPORT_GLIB, [test "x$glib" = "xno"])
272 AM_CONDITIONAL(SUPPORT_EZXML, [test "x$glib" = "xno"])
273 AM_CONDITIONAL(MAP_POI_GEODOWNLOAD, [test "x$glib" = "xyes"])
280 Define to 1 if you have the <zlib.h> header file.
284 ZLIB_CFLAGS="-I\$(top_srcdir)/navit/support/zlib"
285 ZLIB_LIBS="-L\$(top_builddir)/navit/support/zlib -lsupport_zlib"
288 AM_CONDITIONAL(SUPPORT_ZLIB, [test "x$zlib" = "xno"])
289 AC_SUBST(ZLIB_CFLAGS)
293 PKG_CHECK_MODULES(GTK2, [gtk+-2.0], [gtk2_pkgconfig=yes], [gtk2_pkgconfig=no])
294 if test "x$gtk2_pkgconfig" = "xyes"; then
295 AC_DEFINE(HAVE_GTK2, 1, [Define to 1 if you have gtk2])
296 graphics_gtk_drawing_area=yes; graphics_gtk_drawing_area_reason="gtk+-2.0 present"
297 gui_gtk=yes; gui_gtk_reason="gtk+-2.0 present"
301 AC_MSG_CHECKING(for fsync)
302 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))
305 AC_MSG_CHECKING(for system)
306 AC_TRY_LINK([#include <stdlib.h>], [system("/bin/true");],AC_MSG_RESULT(yes);AC_DEFINE(HAVE_SYSTEM, 1, [Define to 1 if you have the `system' function.]),speech_cmdline=no; speech_cmdline_reason="not supported without system()"; AC_MSG_RESULT(no))
308 AC_MSG_CHECKING(for CreateProcess)
309 AC_TRY_LINK([#include <windows.h>], [CreateProcess(NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL);],AC_MSG_RESULT(yes);AC_DEFINE(HAVE_CREATEPROCESS, 1, [Define to 1 if you have the `CreateProcess' function.]) speech_cmdline=yes; speech_cmdline_reason="CreateProcess exists", AC_MSG_RESULT(no))
311 AC_ARG_ENABLE(graphics-sdl, [ --disable-graphics-sdl don't create graphics sdl], graphics_sdl=$enableval;graphics_sdl_reason="configure parameter")
313 if test "x${graphics_sdl}" = "xyes" ; then
314 PKG_CHECK_MODULES(SDL,
317 graphics_sdl_reason="sdl present"] ,
319 graphics_sdl_reason="sdl not available"]
324 if test "x${graphics_sdl}" = "xyes" ; then
325 save_CPPFLAGS=$CPPFLAGS
326 CPPFLAGS="$SDL_CFLAGS $CPPFLAGS"
327 AC_CHECK_HEADER(SDL_image.h,SDL_IMAGE_LIBS=-lSDL_image,graphics_sdl="no";graphics_sdl_reason="SDL_image.h missing")
328 AC_SUBST(SDL_IMAGE_LIBS)
329 CPPFLAGS=$save_CPPFLAGS
331 if test "x${graphics_sdl}" = "xyes" ; then
332 AC_DEFINE(USE_GRAPHICS_SDL, 1, [Build with graphics sdl])
334 AM_CONDITIONAL(USE_GRAPHICS_SDL, test "x${graphics_sdl}" = "xyes")
336 AC_ARG_ENABLE(postgresql, [ --disable-postgresql don't add postgresql support to osm2navit], postgresql=$enableval;postgresql_reason="configure parameter")
337 if test "x${postgresql}" = "xyes" ; then
338 if test -z "$PG_CONFIG"; then
339 AC_PATH_PROG([PG_CONFIG], [pg_config], [])
341 AC_MSG_CHECKING([for PostgreSQL libraries with $PG_CONFIG])
342 if test ! -x "$PG_CONFIG"; then
343 if test "x${PG_CONFIG}" = "x" ; then
344 postgresql_reason="$PG_CONFIG not executable"
346 postgresql_reason="pg_config missing"
351 POSTGRESQL_CFLAGS="-I`$PG_CONFIG --includedir`"
352 POSTGRESQL_LIBS="-L`$PG_CONFIG --libdir` -lpq"
353 AC_DEFINE(HAVE_POSTGRESQL, 1, [Postgresql libraries available])
354 AC_SUBST(POSTGRESQL_CFLAGS)
355 AC_SUBST(POSTGRESQL_LIBS)
359 AM_CONDITIONAL(HAVE_POSTGRESQL, test "x${postgresql}" = "xyes")
362 AC_ARG_ENABLE(font-freetype, [ --disable-font-freetype don't add freetype support], font_freetype=$enableval;font_freetype_reason="configure parameter")
363 if test "x${font_freetype}" = "xyes" -a "x${FREETYPE2_CFLAGS}" = "x" -a "x${FREETYPE2_LIBS}" = "x"; then
364 PKG_CHECK_MODULES(FREETYPE2, [freetype2], , [font_freetype=no;font_freetype_reason="Package freetype2 missing"])
366 AC_SUBST(FREETYPE2_CFLAGS)
367 AC_SUBST(FREETYPE2_LIBS)
368 AM_CONDITIONAL(FONT_FREETYPE, test "x${font_freetype}" = "xyes")
370 AC_ARG_ENABLE(fontconfig, [ --disable-fontconfig don't add fontconfig support], fontconfig=$enableval;fontconfig_reason="configure parameter")
371 if test "x${fontconfig}" = "xyes"; then
372 PKG_CHECK_MODULES(FONTCONFIG, [fontconfig], [fontconfig=yes], [fontconfig=no])
374 if test "x$fontconfig" = "xyes"; then
375 AC_DEFINE(HAVE_FONTCONFIG, 1, [Define to 1 if you have fontconfig])
377 AC_SUBST(FONTCONFIG_CFLAGS)
378 AC_SUBST(FONTCONFIG_LIBS)
380 AM_CONDITIONAL(FONTS, test "x${font_freetype}" = "xyes" -a "x$fontconfig" != "xyes")
382 PKG_CHECK_MODULES(IMLIB2, [imlib2], [imlib2_pkgconfig=yes], [imlib2_pkgconfig=no])
383 if test "x$imlib2_pkgconfig" = "xyes"; then
384 AC_DEFINE(HAVE_IMLIB2, 1, [Define to 1 if you have imlib2])
386 AC_SUBST(IMLIB2_CFLAGS)
387 AC_SUBST(IMLIB2_LIBS)
391 AC_ARG_ENABLE(gui-sdl, [ --disable-gui-sdl don't create gui sdl ], MODULE_GUI_SDL=$enableval, MODULE_GUI_SDL=yes)
392 if test "x$MODULE_GUI_SDL" = "xyes"; then
398 Define to 1 if you have the <SDL/SDL.h> header file.
402 AC_MSG_WARN([*** no SDL/SDL.h -- SDL support disabled])
411 Define to 1 if you have the <X11/Xmu/Xmu.h> header file.
414 AC_MSG_WARN([*** no X11/Xmu/Xmu.h -- opengl and SDL support disabled])
417 AC_ARG_ENABLE(graphics-opengl, [ --disable-graphics-opengl disable graphics type OpenGL], graphics_opengl=$enableval;graphics_opengl_reason="configure parameter")
418 if test "x${graphics_opengl}" = "xyes" ; then
425 Define to 1 if you have the <GL/gl.h> header file.
427 OPENGL_LIBS="$X_LIBS -lGL -lGLU"
429 AC_MSG_WARN([*** no GL/gl.h -- opengl and SDL support disabled];graphics_opengl=no;graphics_opengl_reason="Headers missing")
437 Define to 1 if you have the <GL/glut.h> header file.
440 AC_MSG_WARN([*** no GL/glut.h -- opengl and SDL support disabled]);graphics_opengl=no;graphics_opengl_reason="Headers missing"
443 AC_SUBST(OPENGL_CFLAGS)
444 AC_SUBST(OPENGL_LIBS)
451 Define to 1 if you have the <GL/glc.h> header file.
455 AC_MSG_WARN([*** no GL/glc.h -- opengl and SDL support disabled])
461 AM_CONDITIONAL(GUI_SDL, [test "x$sdl" = "xyes" -a "x$opengl" = "xyes" -a "x$glc" = "xyes" -a "x$xmu" = "xyes" ])
462 AM_CONDITIONAL(GRAPHICS_OPENGL, [test "x$glut" = "xyes" -a "x$opengl" = "xyes" -a "x$glc" = "xyes" ])
465 if test x"${USE_GARMIN}" = xyes
467 # check for libgarmin
468 PKG_CHECK_MODULES(LIBGARMIN, libgarmin, use_libgarmin=yes, use_libgarmin=no)
469 AC_SUBST(LIBGARMIN_CFLAGS)
470 AC_SUBST(LIBGARMIN_LIBS)
472 AM_CONDITIONAL(HAVELIBGARMIN, [test "x$use_libgarmin" = "xyes"])
476 AC_ARG_ENABLE(binding-python, [ --disable-binding-python don't create binding python], binding_python=$enableval;binding_python_reason="configure parameter")
477 if test "x${binding_python}" = "xyes"; then
478 AC_PATH_PROG(_PATH_PYTHON,[python])
479 dnl Libraries and flags for embedded Python.
480 dnl FIXME: I wish there was a less icky way to get this.
481 if test "x${_PATH_PYTHON}" != "x" ; then
482 AC_MSG_CHECKING(for Python linkage)
483 AC_PATH_PROG([PYTHONCONFIG], [python-config], [])
484 if test "x${PYTHONCONFIG}" = "x" ; then
485 py_prefix=`$_PATH_PYTHON -c 'import sys; print sys.prefix'`
486 py_ver=`$_PATH_PYTHON -c 'import sys; print sys.version[[:3]]'`
487 py_lib=`$_PATH_PYTHON -c 'import sys; print sys.lib'`
488 py_libdir="${py_prefix}/${py_lib}/python${py_ver}"
489 PYTHON_CFLAGS="-I${py_prefix}/include/python${py_ver}"
490 if test -f $py_libdir/config/Makefile -a -f $py_prefix/include/python${py_ver}/Python.h; then
491 py_libs=`grep '^LIBS=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
492 py_libc=`grep '^LIBC=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
493 py_libm=`grep '^LIBM=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
494 py_liblocalmod=`grep '^LOCALMODLIBS=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
495 py_libbasemod=`grep '^BASEMODLIBS=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
496 PYTHON_LIBS="-L$py_libdir/config $py_libs $py_libc $py_libm -lpython$py_ver $py_liblocalmod $py_libbasemod"
497 PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/[ \\t]*/ /g'`
498 AC_MSG_RESULT($py_libdir)
501 binding_python_reason="$py_libdir/config/Makefile or $py_prefix/include/python${py_ver}/Python.h missing"
505 PYTHON_CFLAGS="`${PYTHONCONFIG} --cflags`"
506 PYTHON_LIBS="`${PYTHONCONFIG} --ldflags`"
510 binding_python_reason="python executable missing"
513 if test "x${binding_python}" = xyes ; then
514 AC_DEFINE(USE_BINDING_PYTHON, 1, [Build with binding python])
516 AC_SUBST(PYTHON_CFLAGS)
517 AC_SUBST(PYTHON_LIBS)
518 AM_CONDITIONAL(BINDING_PYTHON, test "x${binding_python}" = "xyes")
521 AC_ARG_ENABLE(binding-dbus, [ --disable-binding-dbus don't create binding dbus], binding_dbus=$enableval;binding_dbus_reason="configure parameter")
522 if test "x${binding_dbus}" = "xyes" ; then
523 PKG_CHECK_MODULES(DBUS, [dbus-glib-1], ,binding_dbus=no)
525 if test "x${binding_dbus}" = "xyes" ; then
526 AC_DEFINE(USE_BINDING_DBUS, 1, [Build with binding dbus])
527 vehicle_gpsd_dbus="yes"
528 vehicle_gpsd_dbus_reason="dbus binding present"
530 AC_SUBST(DBUS_CFLAGS)
532 AM_CONDITIONAL(BINDING_DBUS, test "x${binding_dbus}" = "xyes")
533 AM_CONDITIONAL(VEHICLE_GPSD_DBUS, test "x${vehicle_gpsd_dbus}" = "xyes")
534 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")
535 AC_SUBST(DBUS_SERVICE_DIR)
538 AC_ARG_ENABLE(svg, [ --disable-svg disable Scalable Vector Graphics], enable_svg=$enableval, enable_svg=yes)
539 AC_ARG_ENABLE(svg2png, [ --disable-svg2png disable conversion of svgs to pngs], enable_svg2png=$enableval, enable_svg2png=yes)
540 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")
541 AC_ARG_ENABLE(svg2png-scaling-flag, [ --enable-svg2png-scaling-flag enable conversion of flag svgs to pngs with specified sizes], SVG2PNG_SCALES_FLAG=$enableval, SVG2PNG_SCALES_FLAG="8 16 32 48 96")
542 AC_ARG_ENABLE(svg2png-scaling-nav, [ --enable-svg2png-scaling-nav enable conversion of nav svgs to pngs with specified sizes], SVG2PNG_SCALES_NAV=$enableval, SVG2PNG_SCALES_NAV="8 16 32 48 96")
543 AC_ARG_WITH(svg2png-use-convert, [ --with-svg2png-use-convert use imagemagick's convert for png creation], SVG2PNG_CONVERTER="convert")
544 AC_ARG_WITH(svg2png-use-rsvg-convert, [ --with-svg2png-use-rsvg-convert use librsvg's rsvg-convert for png creation], SVG2PNG_CONVERTER="rsvg-convert")
545 AC_ARG_WITH(svg2png-use-inkscape, [ --with-svg2png-use-inkscape use inkscapes internal convert routines for png creation], SVG2PNG_CONVERTER="inkscape")
546 AC_ARG_WITH(svg2png-use-ksvgtopng4, [ --with-svg2png-use-ksvgtopng4 use kde4's ksvgtopng4 for png creation], SVG2PNG_CONVERTER="ksvgtopng4")
547 AC_ARG_WITH(svg2png-use-ksvgtopng, [ --with-svg2png-use-ksvgtopng use kde3's convert for png creation], SVG2PNG_CONVERTER="ksvgtopng")
548 if test "x${enable_svg2png}" = "xyes" ; then
549 if test "x${SVG2PNG_CONVERTER}" = "x"; then
550 SVG2PNG_CONVERTER="rsvg-convert ksvgtopng ksvgtopng4 inkscape convert"
552 AC_PATH_PROGS([SVG2PNG], ${SVG2PNG_CONVERTER}, [none])
553 if test "x${SVG2PNG}" = "xnone"; then
558 AC_SUBST(SVG2PNG_SCALES)
559 AC_SUBST(SVG2PNG_SCALES_FLAG)
560 AC_SUBST(SVG2PNG_SCALES_NAV)
561 AM_CONDITIONAL(USE_SVG2PNG_SCALES, test "x${SVG2PNG_SCALES}" != "xyes" -a "x${SVG2PNG_SCALES}" != "x")
562 AM_CONDITIONAL(USE_SVG2PNG_SCALES_FLAG, test "x${SVG2PNG_SCALES_FLAG}" != "xyes" -a "x${SVG2PNG_SCALES_FLAG}" != "x")
563 AM_CONDITIONAL(USE_SVG2PNG_SCALES_NAV, test "x${SVG2PNG_SCALES_NAV}" != "xyes" -a "x${SVG2PNG_SCALES_NAV}" != "x")
564 AM_CONDITIONAL(USE_SVG2PNG, test "x${enable_svg2png}" = "xyes")
565 AM_CONDITIONAL(USE_SVG, test "x${enable_svg}" = "xyes")
568 AC_ARG_WITH(xslts, [ --with-xslts enable processing of navit.xml with given xslt scripts], XSLTS=$withval, XSLTS="")
570 AC_ARG_WITH(saxon, [ --with-saxon specify the saxon xslt processor], SAXON=$withval, SAXON="saxon")
573 # Android Permissions
574 AC_ARG_WITH(android-permissions, [ --with-android-permissions Set additional android permissions], ANDROID_PERMISSIONS=$withval, ANDROID_PERMISSIONS="")
575 AC_SUBST(ANDROID_PERMISSIONS)
580 [ --disable-nls disable Native Language Support ( gettext/libintl )],
581 enable_nls=$enableval, enable_nls=yes)
590 if test "x$enable_nls" = "xyes"; then
592 AC_CHECK_FUNC(gettext, [HAVEGETTEXT="yes"],[INTLIBS="-lintl" HAVEGETTEXT="yes"])
593 AC_CHECK_PROG(XGETTEXT, xgettext, xgettext)
594 AC_CHECK_PROG(MSGMERGE, msgmerge, msgmerge)
595 AC_CHECK_PROG(MSGFMT, msgfmt, msgfmt)
597 if test "$XGETTEXT" != ""; then
598 if $XGETTEXT --help 2>&1 | grep illegal >/dev/null ; then
599 echo "xgettext isn't GNU version"
604 if test "$XGETTEXT" != "" ; then
606 if test "$LINGUAS" = ""; then
607 ling=` (cd $srcdir/po; /bin/ls *.po.in) `
609 lcode=`basename $l .po.in`
610 LINGUAS="$LINGUAS$lcode "
613 AC_DEFINE(ENABLE_NLS, [1], [NLS Please])
614 echo "xgettext and gettext() exist; will build i18n support for $LINGUAS"
618 echo "xgettext doesn't exist; will not build i18n support"
621 for lang in $LINGUAS; do
622 MOFILES="$MOFILES $lang.mo"
624 for lang in $LINGUAS; do
625 POFILES="$POFILES $lang.po"
627 for lang in $LINGUAS; do
628 POIFILES="$POIFILES $lang.po.in"
635 AM_GNU_GETTEXT_VERSION
636 AM_GNU_GETTEXT(no-libtool, need-ngettext, \$(top_builddir)/intl/)
639 if test x"$LIBINTL" != "x" ;then
640 CFLAGS="$CFLAGS -I\$(top_builddir)/intl/"
644 AM_CONDITIONAL(ENABLE_NLS, [test "x$enable_nls" = "xyes"])
650 [Define to 1 if you have byteswap.h],
656 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
657 AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
661 AC_CHECK_HEADER(wordexp.h,wordexp_h=yes,wordexp_h=no;NAVIT_CFLAGS="$NAVIT_CFLAGS -I\$(top_srcdir)/navit/support/wordexp";WORDEXP_LIBS="-L\$(top_builddir)/navit/support/wordexp -lsupport_wordexp")
662 AM_CONDITIONAL(SUPPORT_WORDEXP, [test "x$wordexp_h" = "xno"])
665 AC_ARG_ENABLE(support_libc, [ --enable-support-libc enable builtin mini libc ], support_libc=$enableval)
666 AM_CONDITIONAL(SUPPORT_LIBC, [test "x$support_libc" = "xyes"])
667 if test "x$support_libc" = "xyes"; then
668 CFLAGS="$CFLAGS -I\$(top_srcdir)/navit/support/libc"
669 LIBC_LIBS="-L\$(top_builddir)/navit/support/libc -lsupport_libc"
674 AC_ARG_ENABLE(graphics-android, [ --disable-graphics-android disable graphics type android], graphics_android=$enableval;graphics_android_reason="configure parameter")
675 AM_CONDITIONAL(GRAPHICS_ANDROID, test "x${graphics_android}" = "xyes")
677 AC_ARG_ENABLE(graphics-gd, [ --enable-graphics-gd enable graphics type gd], graphics_gd=$enableval;graphics_gd_reason="configure parameter")
678 if test "x${graphics_gd}" = "xyes" ; then
679 if test -z "$GDLIB_CONFIG"; then
680 AC_PATH_PROG([GDLIB_CONFIG], [gdlib-config], [])
682 AC_MSG_CHECKING([for gdlib with $GDLIB_CONFIG])
683 if test ! -x "$GDLIB_CONFIG"; then
684 if test "x${GDLIB_CONFIG}" = "x" ; then
685 graphics_gd_reason="$GDLIB_CONFIG not executable"
687 graphics_gd_reason="gdlib-config missing"
692 GD_CFLAGS="-I`$GDLIB_CONFIG --includedir`"
693 GD_LIBS="-L`$GDLIB_CONFIG --libdir` -lgd `$GDLIB_CONFIG --libs`"
699 AM_CONDITIONAL(GRAPHICS_GD, test "x${graphics_gd}" = "xyes")
701 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")
702 AM_CONDITIONAL(GRAPHICS_GTK_DRAWING_AREA, [test "x${graphics_gtk_drawing_area}" = "xyes"])
704 AC_ARG_ENABLE(graphics-win32, [ --disable-graphics-win32 disable graphics type win32], graphics_win32=$enableval;graphics_win32_reason="configure parameter")
705 AM_CONDITIONAL(GRAPHICS_WIN32, test "x${graphics_win32}" = "xyes")
707 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")
708 if test "x${graphics_qt_qpainter}" = "xyes" -a "x${QT_GUI_CFLAGS}" = "x" -a "x${QT_GUI_LIBS}" = "x"; then
709 PKG_CHECK_MODULES(QT_GUI, [QtGui QtCore], ,graphics_qt_qpainter=no,graphics_qt_qpainter_reason="Packages QtGui and/or QtCore missing")
710 if test "x${graphics_qt_qpainter}" = "xno"; then
711 PKG_CHECK_MODULES(QT_GUI, [qt-mt],graphics_qt_qpainter=yes,graphics_qt_qpainter_reason="Package qt-mt present")
714 if test "x${graphics_qt_qpainter}" = "xyes" ; then
715 AC_DEFINE(USE_GRAPICS_QT_QPAINTER, 1, [Build with graphics qt_qpainter])
716 MOC=`$PKG_CONFIG QtGui --variable=moc_location`
717 if test "x${MOC}" = "x"; then
718 AC_CHECK_PROG(MOC, moc, moc)
722 AC_SUBST(QT_GUI_CFLAGS)
723 AC_SUBST(QT_GUI_LIBS)
724 AM_CONDITIONAL(GRAPHICS_QT_QPAINTER, test "x${graphics_qt_qpainter}" = "xyes")
728 AC_ARG_ENABLE(gui-gtk, [ --disable-gui-gtk disable gui type gtk ], gui_gtk=$enableval)
729 AM_CONDITIONAL(GUI_GTK, [test "x${gui_gtk}" = "xyes"])
731 AC_ARG_ENABLE(gui-internal, [ --disable-gui-internal disable gui type internal], gui_internal=$enableval;gui_internal_reason="configure parameter")
732 AM_CONDITIONAL(GUI_INTERNAL, test "x${gui_internal}" = "xyes")
734 AC_ARG_ENABLE(gui-win32, [ --disable-gui-win32 disable gui type win32], gui_win32=$enableval;gui_win32_reason="configure parameter")
735 AM_CONDITIONAL(GUI_WIN32, test "x${gui_win32}" = "xyes")
739 AC_ARG_ENABLE(speech-android, [ --disable-speech-android disable speech type android], speech_android=$enableval;speech_android_reason="configure parameter")
740 AM_CONDITIONAL(SPEECH_ANDROID, test "x${speech_android}" = "xyes")
742 AC_ARG_ENABLE(speech-cmdline, [ --disable-speech-cmdline disable speech type cmdline], speech_cmdline=$enableval;speech_cmdline_reason="configure parameter")
743 AM_CONDITIONAL(SPEECH_CMDLINE, test "x${speech_cmdline}" = "xyes")
745 AC_ARG_ENABLE(speech-espeak, [ --disable-speech-espeak disable speech type espeak], speech_espeak=$enableval;speech_espeak_reason="configure parameter")
746 AM_CONDITIONAL(SPEECH_ESPEAK, test "x${speech_espeak}" = "xyes")
748 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")
749 if test "x$speech_speech_dispatcher" = "xyes"; then
750 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")
752 AC_SUBST(SPEECHD_CFLAGS)
753 AC_SUBST(SPEECHD_LIBS)
754 AM_CONDITIONAL(SPEECH_SPEECH_DISPATCHER, test "x${speech_speech_dispatcher}" = "xyes")
755 AM_CONDITIONAL(SUPPORT_ESPEAK, test "x${support_espeak}" = "xyes")
759 AC_ARG_ENABLE(vehicle-android, [ --disable-vehicle-android disable vehicle type android], vehicle_android=$enableval;vehicle_android_reason="configure parameter")
760 AM_CONDITIONAL(VEHICLE_ANDROID, test "x${vehicle_android}" = "xyes")
762 AC_ARG_ENABLE(vehicle-demo, [ --disable-vehicle-demo disable vehicle type demo], vehicle_demo=$enableval;vehicle_demo_reason="configure parameter")
763 AM_CONDITIONAL(VEHICLE_DEMO, test "x${vehicle_demo}" = "xyes")
765 AC_ARG_ENABLE(vehicle-file, [ --disable-vehicle-file disable vehicle type file], vehicle_file=$enableval;vehicle_file_reason="configure parameter")
766 AM_CONDITIONAL(VEHICLE_FILE, test "x${vehicle_file}" = "xyes")
768 AC_ARG_ENABLE(vehicle-gpsd, [ --disable-vehicle-gpsd disable vehicle type gpsd], vehicle_gpsd=$enableval;vehicle_gpsd_reason="configure parameter")
769 if test "x${vehicle_gpsd}" = xyes
771 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" )
773 AC_SUBST(GPSD_CFLAGS)
775 AM_CONDITIONAL(VEHICLE_GPSD, [test "x${vehicle_gpsd}" = "xyes"])
777 AC_ARG_ENABLE(vehicle-gypsy,[ --disable-vehicle-gypsy disable vehicle type gypsy], vehicle_gypsy=$enableval;vehicle_gypsy_reason="configure parameter")
778 if test "x${vehicle_gypsy}" = "xyes"
780 PKG_CHECK_MODULES(GYPSY, gypsy, ,vehicle_gypsy=no;vehicle_gypsy_reason="package gypsy missing")
782 AC_SUBST(GYPSY_CFLAGS)
784 AM_CONDITIONAL(VEHICLE_GYPSY, test "x${vehicle_gypsy}" = "xyes")
786 AC_ARG_ENABLE(vehicle-null, [ --enable-vehicle-null enable vehicle type null], vehicle_null=$enableval;vehicle_null_reason="configure parameter")
787 AM_CONDITIONAL(VEHICLE_NULL, test "x${vehicle_null}" = "xyes")
789 AC_ARG_ENABLE(vehicle-wince, [ --disable-vehicle-wince disable vehicle type wince], vehicle_wince=$enableval;vehicle_wince_reason="configure parameter")
790 AM_CONDITIONAL(VEHICLE_WINCE, test "x${vehicle_wince}" = "xyes")
792 AC_ARG_ENABLE(vehicle-iphone, [ --disable-vehicle-iphone disable vehicle type iphone], vehicle_iphone=$enableval;vehicle_iphone_reason="configure parameter")
793 AM_CONDITIONAL(VEHICLE_IPHONE, test "x${vehicle_iphone}" = "xyes")
794 if test "x${vehicle_iphone}" = "xyes"
796 IPHONE_LIBS=-Wl,-framework,CoreLocation
798 AC_SUBST(IPHONE_CFLAGS)
799 AC_SUBST(IPHONE_LIBS)
800 NAVIT_CFLAGS="$NAVIT_CFLAGS $GLIB_CFLAGS $GMODULE_CFLAGS"
801 NAVIT_LIBS="$NAVIT_LIBS $GLIB_LIBS $GMODULE_LIBS $LIBINTL"
802 AC_SUBST(NAVIT_CFLAGS)
804 AC_SUBST(WORDEXP_LIBS)
811 navit/binding/Makefile
812 navit/binding/python/Makefile
813 navit/binding/dbus/Makefile
815 navit/map/mg/Makefile
816 navit/map/textfile/Makefile
817 navit/map/shapefile/Makefile
818 navit/map/filter/Makefile
819 navit/map/binfile/Makefile
820 navit/map/garmin/Makefile
821 navit/map/poi_geodownload/Makefile
822 navit/map/poi_geodownload/libmdb/Makefile
823 navit/map/poi_geodownload/libmdb/include/Makefile
824 navit/maptool/Makefile
825 navit/fib-1.1/Makefile
827 navit/font/freetype/Makefile
829 navit/graphics/Makefile
830 navit/graphics/android/Makefile
831 navit/graphics/gd/Makefile
832 navit/graphics/gtk_drawing_area/Makefile
833 navit/graphics/opengl/Makefile
834 navit/graphics/null/Makefile
835 navit/graphics/sdl/Makefile
836 navit/graphics/qt_qpainter/Makefile
837 navit/graphics/win32/Makefile
839 navit/gui/gtk/Makefile
840 navit/gui/internal/Makefile
841 navit/gui/win32/Makefile
843 navit/osd/core/Makefile
844 navit/speech/Makefile
845 navit/speech/android/Makefile
846 navit/speech/cmdline/Makefile
847 navit/speech/espeak/Makefile
848 navit/speech/speech_dispatcher/Makefile
849 navit/support/Makefile
850 navit/support/espeak/Makefile
851 navit/support/ezxml/Makefile
852 navit/support/glib/Makefile
853 navit/support/libc/Makefile
854 navit/support/libpng/Makefile
855 navit/support/win32/Makefile
856 navit/support/wordexp/Makefile
857 navit/support/zlib/Makefile
858 navit/vehicle/Makefile
859 navit/vehicle/android/Makefile
860 navit/vehicle/file/Makefile
861 navit/vehicle/gpsd/Makefile
862 navit/vehicle/gpsd_dbus/Makefile
863 navit/vehicle/gypsy/Makefile
864 navit/vehicle/null/Makefile
865 navit/vehicle/demo/Makefile
866 navit/vehicle/wince/Makefile
867 navit/vehicle/iphone/Makefile
873 #src/data/garmin_img/Makefile
880 echo "Summary of your installation :"
881 # FIXME : maybe elaborate missing dependencies
882 if test x"$sdl" != xyes
884 sdl_failures="(libsdl maybe?) "
886 if test x"$xmu" != xyes
888 sdl_failures=$sdl_failures"libxmu "
890 if test x"$glut" != xyes
892 sdl_failures=$sdl_failures"glut "
894 if test x"$glc" != xyes
896 sdl_failures=$sdl_failures"quesoglc "
898 if test -z "$sdl_failures"
900 echo "OpenGL gui : ENABLED, with $CEGUI_LIBS"
902 echo "OpenGL gui : DISABLED : you are missing $sdl_failures"
904 if test x"$enable_hildon" = xyes
906 echo "Maemo/Hildon: ENABLED"
908 echo "Maemo/Hildon: DISABLED"
910 if test x"${USE_GARMIN}" = xyes
912 if test "x$use_libgarmin" = "xyes"
914 echo "Garmin IMG : ENABLED"
916 echo "Garmin IMG : DISABLED (you don't have libgarmin)"
919 echo "Garmin IMG : DISABLED (you requested it)"
922 if test x"$LIBINTL" = "x" ;then
923 nls_libs="system gettext support"
927 echo "Plugins: $plugins ($plugins_reason)"
928 echo "Postgresql: $postgresql ($postgresql_reason)"
929 echo "Samplemap: $samplemap ($samplemap_reason)"
930 echo "NLS Support: $enable_nls ($nls_libs)"
931 echo "Font renderers:"
932 echo " freetype: $font_freetype ($font_freetype_reason)"
933 echo "Graphics types:"
934 echo " android: $graphics_android ($graphics_android_reason)"
935 echo " gtk_drawing_area: $graphics_gtk_drawing_area ($graphics_gtk_drawing_area_reason)"
936 echo " qt_qpainter: $graphics_qt_qpainter ($graphics_qt_qpainter_reason)"
937 echo " win32: $graphics_win32 ($graphics_win32_reason)"
938 echo " OpenGL: $graphics_opengl ($graphics_opengl_reason)"
939 echo " gd: $graphics_gd ($graphics_gd_reason)"
940 echo " sdl: $graphics_sdl ($graphics_sdl_reason)"
943 echo " gtk: $gui_gtk ($gui_gtk_reason)"
944 echo " internal: $gui_internal ($gui_internal_reason)"
945 echo " win32: $gui_win32 ($gui_win32_reason)"
948 echo " dbus: $binding_dbus ($binding_dbus_reason)"
949 echo " python: $binding_python ($binding_python_reason)"
952 echo " android: $speech_android ($speech_android_reason)"
953 echo " cmdline: $speech_cmdline ($speech_cmdline_reason)"
954 echo " espeak: $speech_espeak ($speech_espeak_reason)"
955 echo " speech_dispatcher: $speech_speech_dispatcher ($speech_speech_dispatcher_reason)"
957 echo "Vehicle types:"
958 echo " android: $vehicle_android ($vehicle_android_reason)"
959 echo " demo: $vehicle_demo ($vehicle_demo_reason)"
960 echo " file: $vehicle_file ($vehicle_file_reason)"
961 echo " gpsd: $vehicle_gpsd ($vehicle_gpsd_reason)"
962 echo " gpsd_dbus: $vehicle_gpsd_dbus ($vehicle_gpsd_dbus_reason)"
963 echo " gypsy: $vehicle_gypsy ($vehicle_gypsy_reason)"
964 echo " null: $vehicle_null ($vehicle_null_reason)"
965 echo " wince: $vehicle_wince ($vehicle_wince_reason)"
966 echo " iphone: $vehicle_iphone ($vehicle_iphone_reason)"
968 if test "x${gtk2_pkgconfig}" != "xyes" -a "x${gui_win32}" != "xyes" -a "x${gui_internal}" != "xyes"
972 echo "*** WARNING! you have no gui that can be built! ***"
973 echo "Please install the dependency for at least gtk or sdl gui"
974 echo "For more details, see the wiki at http://wiki.navit-project.org/"