3 AM_CONFIG_HEADER(config.h)
7 plugins=yes; plugins_reason=default
8 postgresql=yes; postgresql_reason=default
9 samplemap=yes; samplemap_reason=default
10 binding_dbus=yes; binding_dbus_reason=default
11 binding_python=yes; binding_python_reason=default
12 gui_gtk=no; gui_gtk_reason=default
13 gui_win32=no; gui_win32_reason=default
14 gui_internal=yes; gui_internal_reason=default
15 graphics_gtk_drawing_area=no; graphics_gtk_drawing_area_reason=default
16 graphics_qt_qpainter=yes; graphics_qt_qpainter_reason=default
17 graphics_win32=no; graphics_win32_reason=default
18 speech_cmdline=yes; speech_cmdline_reason=default
19 speech_speech_dispatcher=yes; speech_speech_dispatcher_reason=default
20 vehicle_demo=yes; vehicle_demo_reason=default
21 vehicle_file=yes; vehicle_file_reason=default
22 vehicle_gpsd=yes; vehicle_gpsd_reason=default
23 vehicle_gypsy=yes; vehicle_gypsy_reason=default
25 m4_ifndef([AC_USE_SYSTEM_EXTENSIONS],
26 [AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], [AC_GNU_SOURCE])])
28 AC_USE_SYSTEM_EXTENSIONS
31 if eval "test x$GCC = xyes"; then
32 CFLAGS="$CFLAGS -Wall -Wcast-align -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wreturn-type -D_GNU_SOURCE"
37 if eval "test x$GXX = xyes"; then
38 CXXFLAGS="$CXXFLAGS -Wall -Wcast-align -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wreturn-type -D_GNU_SOURCE"
42 if test "x${cross_compiling}" = "xyes"; then
43 samplemap="no";samplemap_reason="not supported for cross compiling"
44 binding_python="no";binding_python_reason="not supported for cross compiling"
45 postgresql="no";postgresql_reason="not supported for cross compiling"
46 AC_MSG_CHECKING([for a C compiler for build tools])
47 AC_CHECK_PROGS(CC_FOR_BUILD, gcc cc)
51 CCLD_FOR_BUILD="$CC_FOR_BUILD"
52 AC_SUBST(cross_compiling)
53 AC_SUBST(CC_FOR_BUILD)
54 AC_SUBST(CCLD_FOR_BUILD)
56 AC_ARG_ENABLE(avoid-unaligned, [ --enable-avoid-unaligned avoid unaligned accesses], AVOID_UNALIGNED=$enableval, AVOID_UNALIGNED=no)
57 test x"${AVOID_UNALIGNED}" = xyes && AC_DEFINE(AVOID_UNALIGNED,[],Define to avoid unaligned access)
59 AC_ARG_ENABLE(avoid-float, [ --enable-avoid-float avoid floating point calculations], AVOID_FLOAT=$enableval, AVOID_FLOAT=no)
60 test x"${AVOID_FLOAT}" = xyes && AC_DEFINE(AVOID_FLOAT,[],Define to avoid floating point)
62 AC_ARG_ENABLE(hildon, [ --enable-hildon build with maemo/hildon support], enable_hildon=$enableval, enable_hildon=no)
63 if test "x${enable_hildon}" = "xyes" ; then
64 PKG_CHECK_MODULES(enable_hildon, hildon-libs >= 0.12.24, , [
68 if test x"${enable_hildon}" = xyes ; then
69 AC_DEFINE(USE_HILDON, 1, [Build with maemo/hildon support])
70 AC_SUBST(HILDON_CFLAGS)
74 AM_CONDITIONAL(USE_HILDON, test "${enable_hildon}" = "xyes")
76 AC_ARG_ENABLE(garmin, [ --disable-garmin disable garmin support], USE_GARMIN=$enableval, USE_GARMIN=yes)
79 AC_PATH_PROG(_PATH_BZCAT,[bzcat])
80 if test "x${_PATH_BZCAT}" = "x" ; then
81 samplemap=no; samplemap_reason="bzcat missing"
83 AC_ARG_ENABLE(samplemap, [ --disable-samplemap don't build the samplemap], samplemap=$enableval;samplemap_reason="configure parameter")
84 AM_CONDITIONAL(BUILD_SAMPLEMAP, [test "x$samplemap" = "xyes"])
86 AC_ARG_ENABLE(fastmath, [ --disable-fastmath don't build with fastmath], fastmath=$enableval, fastmath=yes)
87 AM_CONDITIONAL(FASTMATH, [test "x$fastmath" = "xyes"])
89 if test x"$fastmath" = xyes; then
90 if eval "test x$GCC = xyes"; then
91 CFLAGS="$CFLAGS -ffast-math"
95 X_CFLAGS="-I$x_includes"
96 AS_IF([test -n "$ac_x_libraries"], [X_LIBS="-L$ac_x_libraries"])
98 PKG_CHECK_MODULES(GLIB, [glib-2.0 gthread-2.0], [glib=yes],[glib=no])
99 if test "x${glib}" = "xyes"; then
100 AC_DEFINE(HAVE_GLIB, 1, [Define to 1 if you have (external) glib library])
102 GLIB_CFLAGS="-I\$(top_srcdir)/navit/support -I\$(top_srcdir)/navit/support/glib -I\$(top_srcdir)/navit/support/ezxml"
103 GLIB_LIBS="-L\$(top_builddir)/navit/support/glib -lsupport_glib -L\$(top_builddir)/navit/support/ezxml -lsupport_ezxml"
104 speech_cmdline=no; speech_cmdline_reason="not yet supported without glib"
105 gui_internal=no; gui_internal_reason="not yet supported without glib"
106 vehicle_demo=no; vehicle_demo_reason="not yet supported without glib"
107 vehicle_file=no; vehicle_file_reason="not yet supported without glib"
111 PKG_CHECK_MODULES(GMODULE, [gmodule-2.0], [gmodule=yes], [gmodule=no])
112 if test "x${gmodule}" = "xyes"; then
113 AC_DEFINE(HAVE_GMODULE, 1, [Define to 1 if you have gmodule])
115 plugins="no"; plugins_reason="package gmodule missing"
118 AC_ARG_ENABLE(plugins, [ --disable-plugins disable plugins], [ plugins=$enableval;plugin_reason="configure parameter" ])
119 if test "x${plugins}" = "xyes"; then
125 Define to 1 if you have plugins.
131 AM_CONDITIONAL(PLUGINS, [test "x$plugins" = "xyes"])
134 AM_CONDITIONAL(EVENT_GLIB, [test "x$glib" = "xyes"])
135 AM_CONDITIONAL(SUPPORT_GLIB, [test "x$glib" = "xno"])
136 AM_CONDITIONAL(SUPPORT_EZXML, [test "x$glib" = "xno"])
137 AM_CONDITIONAL(DATA_POI_GEODOWNLOAD, [test "x$glib" = "xyes"])
144 Define to 1 if you have the <zlib.h> header file.
148 ZLIB_CFLAGS="-I\$(top_srcdir)/navit/support/zlib"
149 ZLIB_LIBS="-L\$(top_builddir)/navit/support/zlib -lsupport_zlib"
152 AM_CONDITIONAL(SUPPORT_ZLIB, [test "x$zlib" = "xno"])
153 AC_SUBST(ZLIB_CFLAGS)
157 PKG_CHECK_MODULES(GTK2, [gtk+-2.0], [gtk2_pkgconfig=yes], [gtk2_pkgconfig=no])
158 if test "x$gtk2_pkgconfig" = "xyes"; then
159 AC_DEFINE(HAVE_GTK2, 1, [Define to 1 if you have gtk2])
160 graphics_gtk_drawing_area=yes; graphics_gtk_drawing_area_reason="gtk+-2.0 present"
161 gui_gtk=yes; gui_gtk_reason="gtk+-2.0 present"
165 AC_MSG_CHECKING(for fsync)
166 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))
169 AC_MSG_CHECKING(for system)
170 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.]),AC_MSG_RESULT(no))
172 AC_ARG_ENABLE(directfb, [ --enable-directfb enable directfb gui and graphics], MODULE_DIRECTFB=$enableval, MODULE_DIRECTFB=no)
174 if test "x$MODULE_DIRECTFB" = "xyes"; then
175 PKG_CHECK_MODULES(DIRECTFB, [directfb], [directfb_pkgconfig=yes], [directfb_pkgconfig=no])
176 if test "x$directfb_pkgconfig" = "xyes"; then
177 AC_DEFINE(HAVE_DIRECTFB, 1, [Define to 1 if you have directfb])
181 DIRECTFB_CFLAGS="$DIRECTFB_CFLAGS"
183 #DIRECTFB_CFLAGS="-D_REENTRANT -I/data/oe/tmp/staging/arm-angstrom-linux-gnueabi/usr/include/directfb/"
184 #DIRECTFB_LIBS="-L/data/oe/tmp/staging/arm-angstrom-linux-gnueabi/usr/lib/ -ldirectfb -lfusion -ldirect -lpthread"
186 AC_SUBST(DIRECTFB_CFLAGS)
187 AC_SUBST(DIRECTFB_LIBS)
188 AM_CONDITIONAL(DIRECTFB, [test "x$directfb_pkgconfig" = "xyes"])
191 AC_ARG_ENABLE(graphics-sdl, [ --disable-graphics-sdl don't create graphics sdl], enable_graphics_sdl=$enableval, enable_graphics_sdl=yes)
192 if test "x${enable_graphics_sdl}" = "xyes" ; then
193 if test -z "$SDL_CONFIG"; then
194 AC_PATH_PROG([SDL_CONFIG], [sdl-config], [])
197 if test "x${enable_graphics_sdl}" = "xyes" ; then
198 AC_MSG_CHECKING([for SDL libraries with $SDL_CONFIG])
199 if test ! -x "$SDL_CONFIG"; then
200 enable_graphics_sdl = "no"
203 SDL_CFLAGS="`$SDL_CONFIG --cflags`"
204 SDL_LIBS="`$SDL_CONFIG --libs`"
210 if test "x${enable_graphics_sdl}" = "xyes" ; then
211 save_CPPFLAGS=$CPPFLAGS
212 CPPFLAGS="$($SDL_CONFIG --cflags) $CPPFLAGS"
213 AC_CHECK_HEADER(SDL_image.h,SDL_IMAGE_LIBS=-lSDL_image,enable_graphics_sdl=no)
214 AC_SUBST(SDL_IMAGE_LIBS)
215 CPPFLAGS=$save_CPPFLAGS
217 if test "x${enable_graphics_sdl}" = "xyes" ; then
218 AC_DEFINE(USE_GRAPICS_SDL, 1, [Build with graphics sdl])
220 AM_CONDITIONAL(USE_GRAPHICS_SDL, test "x${enable_graphics_sdl}" = "xyes")
222 AC_ARG_ENABLE(postgresql, [ --disable-postgresql don't add postgresql support to osm2navit], postgresql=$enableval;postgresql_reason="configure parameter")
223 if test "x${postgresql}" = "xyes" ; then
224 if test -z "$PG_CONFIG"; then
225 AC_PATH_PROG([PG_CONFIG], [pg_config], [])
227 AC_MSG_CHECKING([for PostgreSQL libraries with $PG_CONFIG])
228 if test ! -x "$PG_CONFIG"; then
229 if test "x${PG_CONFIG}" = "x" ; then
230 postgresql_reason="$PG_CONFIG not executable"
232 postgresql_reason="pg_config missing"
237 POSTGRESQL_CFLAGS="-I`$PG_CONFIG --includedir`"
238 POSTGRESQL_LIBS="-L`$PG_CONFIG --libdir` -lpq"
239 AC_DEFINE(HAVE_POSTGRESQL, 1, [Postgresql libraries available])
240 AC_SUBST(POSTGRESQL_CFLAGS)
241 AC_SUBST(POSTGRESQL_LIBS)
245 AM_CONDITIONAL(HAVE_POSTGRESQL, test "x${postgresql}" = "xyes")
247 PKG_CHECK_MODULES(FREETYPE2, [freetype2], [freetype2_pkgconfig=yes], [freetype2_pkgconfig=no])
248 if test "x$freetype2_pkgconfig" = "xyes"; then
249 AC_DEFINE(HAVE_FREETYPE2, 1, [Define to 1 if you have freetype2])
251 AC_SUBST(FREETYPE2_CFLAGS)
252 AC_SUBST(FREETYPE2_LIBS)
254 PKG_CHECK_MODULES(FONTCONFIG, [fontconfig], [fontconfig_pkgconfig=yes], [fontconfig_pkgconfig=no])
255 if test "x$fontconfig_pkgconfig" = "xyes"; then
256 AC_DEFINE(HAVE_FONTCONFIG, 1, [Define to 1 if you have fontconfig])
258 AC_SUBST(FONTCONFIG_CFLAGS)
259 AC_SUBST(FONTCONFIG_LIBS)
261 PKG_CHECK_MODULES(IMLIB2, [imlib2], [imlib2_pkgconfig=yes], [imlib2_pkgconfig=no])
262 if test "x$imlib2_pkgconfig" = "xyes"; then
263 AC_DEFINE(HAVE_IMLIB2, 1, [Define to 1 if you have imlib2])
265 AC_SUBST(IMLIB2_CFLAGS)
266 AC_SUBST(IMLIB2_LIBS)
270 AC_ARG_ENABLE(gui-sdl, [ --disable-gui-sdl don't create gui sdl ], MODULE_GUI_SDL=$enableval, MODULE_GUI_SDL=yes)
271 if test "x$MODULE_GUI_SDL" = "xyes"; then
277 Define to 1 if you have the <SDL/SDL.h> header file.
281 AC_MSG_WARN([*** no SDL/SDL.h -- SDL support disabled])
287 [CEGUI-OPENGL >= 0.5.0],
292 [Define to 1 if you have the @<:@CEGUI/CEGUI.h@:>@ header file.])
295 [AC_MSG_WARN([*** CEGUI not found -- SDL support disabled])]
303 Define to 1 if you have the <X11/Xmu/Xmu.h> header file.
306 AC_MSG_WARN([*** no X11/Xmu/Xmu.h -- opengl and SDL support disabled])
314 Define to 1 if you have the <GL/gl.h> header file.
316 OPENGL_LIBS="$X_LIBS -lGL -lGLU"
318 AC_MSG_WARN([*** no GL/gl.h -- opengl and SDL support disabled])
326 Define to 1 if you have the <GL/glut.h> header file.
329 AC_MSG_WARN([*** no GL/glut.h -- opengl and SDL support disabled])
332 AC_SUBST(OPENGL_CFLAGS)
333 AC_SUBST(OPENGL_LIBS)
340 Define to 1 if you have the <GL/glc.h> header file.
344 AC_MSG_WARN([*** no GL/glc.h -- opengl and SDL support disabled])
349 if test x"$cegui" = xyes
351 # Save the LIBS into a temp var since AC_CHECK_LIB adds the lib into LIBS
352 # and we want just to check and use CEGUI_LIBS
354 # For CEGUI, we have to check the presence of some libraries.
355 # The following are mandatory (used by navit)
356 # If the user installed NavIt without, issue a warning and disable CEGUI
357 AC_CHECK_LIB(CEGUIBase, main,
360 echo "Error! Something is wrong with CEGUIBase. Do you have at least cegui-0.5?"
362 AC_CHECK_LIB(CEGUIOpenGLRenderer, main,
365 echo "Error! Something is wrong with CEGUIOpenGLRenderer. Do you have at least cegui-0.5? "
367 AC_CHECK_LIB(CEGUIFalagardWRBase, main,
370 echo "Error! Something is wrong with CEGUIFalagardWRBase. Do you have at least cegui-0.5?"
372 CEGUI_LIBS="-lCEGUIBase -lCEGUIOpenGLRenderer -lCEGUIFalagardWRBase"
374 # The following are optional, but we need to link against them if cegui was built with them
375 AC_CHECK_LIB(CEGUIXercesParser, main,
376 [CEGUI_LIBS="$CEGUI_LIBS -lCEGUIXercesParser"],
377 [echo "CEGUIXercesParser not found/not working, disabled."],
381 AC_CHECK_LIB(CEGUIExpatParser, main,
382 [CEGUI_LIBS="$CEGUI_LIBS -lCEGUIExpatParser"],
383 [echo "CEGUIExpatParser not found/not working, disabled."],
387 AC_CHECK_LIB(CEGUILibxmlParser, main,
388 [CEGUI_LIBS="$CEGUI_LIBS -lCEGUILibxmlParser"],
389 [echo "CEGUILibxmlParser not found/not working, disabled."],
393 AC_CHECK_LIB(CEGUITinyXMLParser, main,
394 [CEGUI_LIBS="$CEGUI_LIBS -lCEGUITinyXMLParser"],
395 [echo "CEGUITinyXMLParser not found/not working, disabled."],
399 AC_CHECK_LIB(CEGUIDevILImageCodec, main,
401 CEGUI_LIBS="$CEGUI_LIBS -lCEGUIDevILImageCodec"
402 AC_DEFINE([HAVE_LIBCEGUIDEVILIMAGECODEC],[1],Define to 1 to use DevIL codec)
404 [echo "CEGUIDevILImageCodec not found/not working, disabled."],
408 AC_CHECK_LIB(CEGUITGAImageCodec, createImageCodec,
410 CEGUI_LIBS="$CEGUI_LIBS -lCEGUITGAImageCodec"
411 AC_DEFINE(HAVE_LIBCEGUITGAIMAGECODEC,[1],Define to 1 to use the TGA codec)
413 [echo "GUITGAImageCodec not found/not working, disabled."],
417 libssilly="$OPENGL_LIBS -lpng"
418 AC_CHECK_LIB(CEGUISILLYImageCodec, createImageCodec,
420 CEGUI_LIBS="$CEGUI_LIBS -lCEGUISILLYImageCodec"
421 AC_DEFINE([HAVE_LIBCEGUISILLYIMAGECODEC],[1],Define to 1 to use SILLY codec)
423 [echo "CEGUISILLYImageCodec not found/not working, disabled."],
428 echo "CEGUI_LIBS : $CEGUI_LIBS"
431 AC_SUBST(CEGUI_CFLAGS)
434 AM_CONDITIONAL(GUI_SDL, [test "x$sdl" = "xyes" -a "x$cegui" = "xyes" -a "x$opengl" = "xyes" -a "x$glc" = "xyes" -a "x$xmu" = "xyes" ])
435 AM_CONDITIONAL(GRAPHICS_OPENGL, [test "x$opengl" = "xyes" -a "x$glc" = "xyes" ])
437 AC_ARG_ENABLE(gui-clutter, [ --disable-gui-clutter don't create gui clutter ], MODULE_GUI_CLUTTER=$enableval, MODULE_GUI_CLUTTER=yes)
438 if test "x$MODULE_GUI_CLUTTER" = "xyes"; then
439 PKG_CHECK_MODULES(CLUTTER, [clutter-0.8], [clutter_pkgconfig=yes], [clutter_pkgconfig=no])
440 if test "x$clutter_pkgconfig" = "xyes"; then
441 AC_DEFINE(HAVE_CLUTTER, 1, [Define to 1 if you have clutter])
445 AC_SUBST(CLUTTER_CFLAGS)
446 AC_SUBST(CLUTTER_LIBS)
447 AM_CONDITIONAL(GUI_CLUTTER, [test "x$clutter_pkgconfig" = "xyes" -a "x$glc" = "xyes" ])
452 if test x"${USE_GARMIN}" = xyes
454 # check for libgarmin
455 PKG_CHECK_MODULES(LIBGARMIN, libgarmin, use_libgarmin=yes, use_libgarmin=no)
456 AC_SUBST(LIBGARMIN_CFLAGS)
457 AC_SUBST(LIBGARMIN_LIBS)
459 AM_CONDITIONAL(HAVELIBGARMIN, [test "x$use_libgarmin" = "xyes"])
463 AC_ARG_ENABLE(binding-python, [ --disable-binding-python don't create binding python], binding_python=$enableval;binding_python_reason="configure parameter")
464 if test "x${binding_python}" = "xyes"; then
465 AC_PATH_PROG(_PATH_PYTHON,[python])
466 dnl Libraries and flags for embedded Python.
467 dnl FIXME: I wish there was a less icky way to get this.
468 if test "x${_PATH_PYTHON}" != "x" ; then
469 AC_MSG_CHECKING(for Python linkage)
470 py_prefix=`$_PATH_PYTHON -c 'import sys; print sys.prefix'`
471 py_ver=`$_PATH_PYTHON -c 'import sys; print sys.version[[:3]]'`
472 py_libdir="${py_prefix}/lib/python${py_ver}"
473 PYTHON_CFLAGS="-I${py_prefix}/include/python${py_ver}"
474 if test -f $py_libdir/config/Makefile -a -f $py_prefix/include/python${py_ver}/Python.h; then
475 py_libs=`grep '^LIBS=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
476 py_libc=`grep '^LIBC=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
477 py_libm=`grep '^LIBM=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
478 py_liblocalmod=`grep '^LOCALMODLIBS=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
479 py_libbasemod=`grep '^BASEMODLIBS=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
480 PYTHON_LIBS="-L$py_libdir/config $py_libs $py_libc $py_libm -lpython$py_ver $py_liblocalmod $py_libbasemod"
481 PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/[ \\t]*/ /g'`
482 AC_MSG_RESULT($py_libdir)
485 binding_python_reason="$py_libdir/config/Makefile or $py_prefix/include/python${py_ver}/Python.h missing"
489 binding_python_reason="python executable missing"
492 if test "x${binding_python}" = xyes ; then
493 AC_DEFINE(USE_BINDING_PYTHON, 1, [Build with binding python])
495 AC_SUBST(PYTHON_CFLAGS)
496 AC_SUBST(PYTHON_LIBS)
497 AM_CONDITIONAL(BINDING_PYTHON, test "x${binding_python}" = "xyes")
500 AC_ARG_ENABLE(binding-dbus, [ --disable-binding-dbus don't create binding dbus], binding_dbus=$enableval;binding_dbus_reason="configure parameter")
501 if test "x${binding_dbus}" = "xyes" ; then
502 PKG_CHECK_MODULES(DBUS, [dbus-glib-1], ,binding_dbus=no)
504 if test "x${binding_dbus}" = "xyes" ; then
505 AC_DEFINE(USE_BINDING_DBUS, 1, [Build with binding dbus])
507 AC_SUBST(DBUS_CFLAGS)
509 AM_CONDITIONAL(BINDING_DBUS, test "x${binding_dbus}" = "xyes")
512 AC_ARG_ENABLE(svg, [ --disable-svg disable Scalable Vector Graphics], enable_svg=$enableval, enable_svg=yes)
513 AC_ARG_ENABLE(svg2png, [ --disable-svg2png disable conversion of svgs to pngs], enable_svg2png=$enableval, enable_svg2png=yes)
514 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")
515 if test "x${enable_svg2png}" = "xyes" ; then
516 AC_PATH_PROG([KSVGTOPNG], [ksvgtopng], [])
517 if test ! -x "$KSVGTOPNG"; then
521 AC_SUBST(SVG2PNG_SCALES)
522 AM_CONDITIONAL(USE_SVG2PNG_SCALES, test "x${SVG2PNG_SCALES}" != "xyes" -a "x${SVG2PNG_SCALES}" != "x")
523 AM_CONDITIONAL(USE_SVG2PNG, test "x${enable_svg2png}" = "xyes")
524 AM_CONDITIONAL(USE_SVG, test "x${enable_svg}" = "xyes")
529 [ --disable-nls disable Native Language Support ( gettext/libintl )],
530 enable_nls=$enableval, enable_nls=yes)
538 if test x$enable_nls = xyes; then
540 AC_CHECK_FUNC(gettext, [HAVEGETTEXT="yes"],
541 AC_CHECK_LIB(intl, gettext, [INTLIBS="-lintl" HAVEGETTEXT="yes"],
544 AC_CHECK_PROG(XGETTEXT, xgettext, xgettext)
545 AC_CHECK_PROG(MSGMERGE, msgmerge, msgmerge)
546 AC_CHECK_PROG(MSGFMT, msgfmt, msgfmt)
548 if test "$XGETTEXT" != ""; then
549 if $XGETTEXT --help 2>&1 | grep illegal >/dev/null ; then
550 echo "xgettext isn't GNU version"
555 if test "$XGETTEXT" != "" -a "$HAVEGETTEXT" != ""; then
557 if test "$LINGUAS" = ""; then
558 ling=` (cd $srcdir/po; /bin/ls *.po.in) `
560 lcode=`basename $l .po.in`
561 LINGUAS="$LINGUAS$lcode "
564 AC_DEFINE(ENABLE_NLS, [1], [NLS Please])
565 echo "xgettext and gettext() exist; will build i18n support for $LINGUAS"
569 echo "xgettext and libintl.a don't both exist; will not build i18n support"
571 for lang in $LINGUAS; do
572 MOFILES="$MOFILES $lang.mo"
574 for lang in $LINGUAS; do
575 POFILES="$POFILES $lang.po"
584 [Define to 1 if you have byteswap.h],
592 AM_GNU_GETTEXT_VERSION
595 LIBS="$LIBS -lm -rdynamic"
598 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
599 AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
603 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")
604 AM_CONDITIONAL(SUPPORT_WORDEXP, [test "x$wordexp_h" = "xno"])
611 AC_DEFINE(HAVE_API_WIN32_BASE, 1, [Have Windows Base API])
612 AC_DEFINE(HAVE_API_WIN32_CE, 1, [Have Windows CE API])
613 gui_win32=yes; gui_win32_reason="host_os is wince"
614 graphics_win32=yes; graphics_win32_reason="host_os is wince"
617 if test "x$win32" = "xyes"
619 NAVIT_CFLAGS="$NAVIT_CFLAGS -I\$(top_srcdir)/navit/support/win32"
620 NAVIT_LIBS="$NAVIT_LIBS -L\$(top_builddir)/navit/support/win32 -lsupport_win32"
622 AM_CONDITIONAL(SUPPORT_WIN32, [test "x$win32" = "xyes"])
626 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")
627 AM_CONDITIONAL(GRAPHICS_GTK_DRAWING_AREA, [test "x${graphics_gtk_drawing_area}" = "xyes"])
629 AC_ARG_ENABLE(graphics-win32, [ --disable-graphics-win32 disable graphics type win32], graphics_win32=$enableval;graphics_win32_reason="configure parameter")
630 AM_CONDITIONAL(GRAPHICS_WIN32, test "x${graphics_win32}" = "xyes")
632 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")
633 echo " qt_qpainter: $graphics_qt_qpainter ($graphics_qt_qpainter_reason)"
634 if test "x${graphics_qt_qpainter}" = "xyes" -a "x${QT_GUI_CFLAGS}" = "x" -a "x${QT_GUI_LIBS}" = "x"; then
635 PKG_CHECK_MODULES(QT_GUI, [QtGui QtCore], ,graphics_qt_qpainter=no,graphics_qt_qpainter_reason="Packages QtGui and/or QtCore missing")
637 if test "x${graphics_qt_qpainter}" = "xyes" ; then
638 AC_DEFINE(USE_GRAPICS_QT_QPAINTER, 1, [Build with graphics qt_qpainter])
640 AC_SUBST(QT_GUI_CFLAGS)
641 AC_SUBST(QT_GUI_LIBS)
642 AM_CONDITIONAL(GRAPHICS_QT_QPAINTER, test "x${graphics_qt_qpainter}" = "xyes")
646 AC_ARG_ENABLE(gui-gtk, [ --disable-gui-gtk disable gui type gtk ], gui_gtk=$enableval)
647 AM_CONDITIONAL(GUI_GTK, [test "x${gui_gtk}" = "xyes"])
649 AC_ARG_ENABLE(gui-internal, [ --disable-gui-internal disable gui type internal], gui_internal=$enableval;gui_internal_reason="configure parameter")
650 AM_CONDITIONAL(GUI_INTERNAL, test "x${gui_internal}" = "xyes")
652 AC_ARG_ENABLE(gui-win32, [ --disable-gui-win32 disable gui type win32], gui_win32=$enableval;gui_win32_reason="configure parameter")
653 AM_CONDITIONAL(GUI_WIN32, test "x${gui_win32}" = "xyes")
657 AC_ARG_ENABLE(speech-cmdline, [ --disable-speech-cmdline disable speech type cmdline], speech_cmdline=$enableval;speech_cmdline_reason="configure parameter")
658 AM_CONDITIONAL(SPEECH_CMDLINE, test "x${speech_cmdline}" = "xyes")
660 AC_ARG_ENABLE(speech-speechd, [ --disable-speech-speech-dispatcher disable speech type speech-dispatcher], speech_speech_dispatcher=$enableval;speech_speech_dispatcher_reason="configure parameter")
661 if test "x$speech_speech_dispatcher" = "xyes"; then
662 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")
664 AC_SUBST(SPEECHD_CFLAGS)
665 AC_SUBST(SPEECHD_LIBS)
666 AM_CONDITIONAL(SPEECH_SPEECH_DISPATCHER, test "x${speech_speech_dispatcher}" = "xyes")
670 AC_ARG_ENABLE(vehicle-demo, [ --disable-vehicle-demo disable vehicle type demo], vehicle_demo=$enableval;vehicle_demo_reason="configure parameter")
671 AM_CONDITIONAL(VEHICLE_DEMO, test "x${vehicle_demo}" = "xyes")
673 AC_ARG_ENABLE(vehicle-file, [ --disable-vehicle-file disable vehicle type file], vehicle_file=$enableval;vehicle_file_reason="configure parameter")
674 AM_CONDITIONAL(VEHICLE_FILE, test "x${vehicle_file}" = "xyes")
676 if test "x${vehicle_gpsd}" = xyes
678 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" )
680 AC_SUBST(GPSD_CFLAGS)
682 AM_CONDITIONAL(VEHICLE_GPSD, [test "x${vehicle_gpsd}" = "xyes"])
684 AC_ARG_ENABLE(vehicle-gypsy,[ --disable-vehicle-gypsy disable vehicle type gypsy], vehicle_gypsy=$enableval;vehicle_gypsy_reason="configure parameter")
685 if test "x${vehicle_gypsy}" = "xyes"
687 PKG_CHECK_MODULES(GYPSY, gypsy, ,vehicle_gypsy=no;vehicle_gypsy_reason="package gypsy missing")
689 AC_SUBST(GYPSY_CFLAGS)
691 AM_CONDITIONAL(VEHICLE_GYPSY, test "x${vehicle_gypsy}" = "xyes")
693 NAVIT_CFLAGS="$NAVIT_CFLAGS $GLIB_CFLAGS $GMODULE_CFLAGS -I\$(top_builddir)/intl"
694 NAVIT_LIBS="$NAVIT_LIBS $GLIB_LIBS $GMODULE_LIBS -L\$(top_builddir)/intl"
695 AC_SUBST(NAVIT_CFLAGS)
701 navit/binding/Makefile
702 navit/binding/python/Makefile
703 navit/binding/dbus/Makefile
705 navit/data/mg/Makefile
706 navit/data/textfile/Makefile
707 navit/data/binfile/Makefile
708 navit/data/garmin/Makefile
709 navit/data/poi_geodownload/Makefile
710 navit/data/poi_geodownload/libmdb/Makefile
711 navit/data/poi_geodownload/libmdb/include/Makefile
712 navit/fib-1.1/Makefile
713 navit/graphics/Makefile
714 navit/graphics/gtk_drawing_area/Makefile
715 navit/graphics/directfb/Makefile
716 navit/graphics/cogl/Makefile
717 navit/graphics/opengl/Makefile
718 navit/graphics/null/Makefile
719 navit/graphics/sdl/Makefile
720 navit/graphics/qt_qpainter/Makefile
721 navit/graphics/win32/Makefile
723 navit/gui/gtk/Makefile
724 navit/gui/internal/Makefile
725 navit/gui/clutter/Makefile
726 navit/gui/cegui/Makefile
727 navit/gui/cegui/datafiles/Makefile
728 navit/gui/directfb/Makefile
729 navit/gui/win32/Makefile
731 navit/osd/core/Makefile
732 navit/speech/Makefile
733 navit/speech/cmdline/Makefile
734 navit/speech/speech_dispatcher/Makefile
735 navit/support/Makefile
736 navit/support/ezxml/Makefile
737 navit/support/glib/Makefile
738 navit/support/win32/Makefile
739 navit/support/wordexp/Makefile
740 navit/support/zlib/Makefile
741 navit/vehicle/Makefile
742 navit/vehicle/file/Makefile
743 navit/vehicle/gpsd/Makefile
744 navit/vehicle/gypsy/Makefile
745 navit/vehicle/demo/Makefile
751 #src/data/garmin_img/Makefile
758 echo "Summary of your installation :"
759 # FIXME : maybe elaborate missing dependencies
760 if test x"$sdl" != xyes
762 sdl_failures="(libsdl maybe?) "
764 if test x"$xmu" != xyes
766 sdl_failures=$sdl_failures"libxmu "
768 if test x"$glut" != xyes
770 sdl_failures=$sdl_failures"glut "
772 if test x"$glc" != xyes
774 sdl_failures=$sdl_failures"quesoglc "
776 if test x"$cegui" != xyes
778 sdl_failures=$sdl_failures"cegui-devel >= 0.5 "
780 if test -z "$sdl_failures"
782 echo "OpenGL gui : ENABLED, with $CEGUI_LIBS"
784 echo "OpenGL gui : DISABLED : you are missing $sdl_failures"
786 if test x"$directfb_pkgconfig" = xyes
788 echo "DIRECTFB : ENABLED"
790 echo "DIRECTFB : DISABLED"
792 if test x"$clutter_pkgconfig" = xyes
794 echo "Clutter gui : ENABLED"
796 echo "Clutter gui : DISABLED"
798 if test x"$enable_hildon" = xyes
800 echo "Maemo/Hildon: ENABLED"
802 echo "Maemo/Hildon: DISABLED"
804 if test x"${USE_GARMIN}" = xyes
806 if test "x$use_libgarmin" = "xyes"
808 echo "Garmin IMG : ENABLED"
810 echo "Garmin IMG : DISABLED (you don't have libgarmin)"
813 echo "Garmin IMG : DISABLED (you requested it)"
815 echo "Plugins: $plugins ($plugins_reason)"
816 echo "Postgresql: $postgresql ($postgresql_reason)"
817 echo "Samplemap: $samplemap ($samplemap_reason)"
818 echo "Graphics types:"
819 echo " gtk_drawing_area: $graphics_gtk_drawing_area ($graphics_gtk_drawing_area_reason)"
820 echo " qt_qpainter: $graphics_qt_qpainter ($graphics_qt_qpainter_reason)"
821 echo " win32: $graphics_win32 ($graphics_win32_reason)"
824 echo " gtk: $gui_gtk ($gui_gtk_reason)"
825 echo " internal: $gui_internal ($gui_internal_reason)"
826 echo " win32: $gui_win32 ($gui_win32_reason)"
829 echo " cmdline: $speech_cmdline ($speech_cmdline_reason)"
830 echo " speech_dispatcher: $speech_speech_dispatcher ($speech_speech_dispatcher_reason)"
832 echo "Vehicle types:"
833 echo " demo: $vehicle_demo ($vehicle_demo_reason)"
834 echo " file: $vehicle_file ($vehicle_file_reason)"
835 echo " gpsd: $vehicle_gpsd ($vehicle_gpsd_reason)"
836 echo " gypsy: $vehicle_gypsy ($vehicle_gypsy_reason)"
838 if [ test x"$gtk2_pkgconfig" != xyes ] && [ test x"$sdl" != xyes ] && [ test x"$directfb_pkgconfig" != xyes ] && [ test x"$gui_win32" != xyes ]
842 echo "*** WARNING! you have no gui that can be built! ***"
843 echo "Please install the dependency for at least gtk or sdl gui"
844 echo "For more details, see the wiki at http://wiki.navit-project.org/"