5 AM_CONFIG_HEADER(config.h)
8 AM_CONDITIONAL(SOURCE_MODE_SVN, [test "x${SOURCE_MODE}" = "xsvn"])
10 if test "x${SOURCE_MODE}" = "xsvn" ; then
11 USE_MAINTAINER_MODE=yes
13 USE_MAINTAINER_MODE=no
16 AC_DEFUN([AM_MAINTAINER_MODE],
17 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
18 dnl maintainer-mode is enabled by default (reason of inclusion of this function)
19 AC_ARG_ENABLE(maintainer-mode,
20 [ --enable-maintainer-mode enable make rules and dependencies not useful
21 (and sometimes confusing) to the casual installer],
22 USE_MAINTAINER_MODE=$enableval)
23 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
24 AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
25 MAINT=$MAINTAINER_MODE_TRUE
30 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
35 plugins=yes; plugins_reason=default
36 postgresql=yes; postgresql_reason=default
37 samplemap=yes; samplemap_reason=default
38 binding_dbus=yes; binding_dbus_reason=default
39 binding_python=yes; binding_python_reason=default
40 gui_gtk=no; gui_gtk_reason=default
41 gui_win32=no; gui_win32_reason=default
42 gui_internal=yes; gui_internal_reason=default
43 graphics_gd=no; graphics_gd_reason=default
44 graphics_gtk_drawing_area=no; graphics_gtk_drawing_area_reason=default
45 graphics_qt_qpainter=yes; graphics_qt_qpainter_reason=default
46 graphics_opengl=yes; graphics_opengl_reason=default
47 graphics_win32=no; graphics_win32_reason=default
48 speech_cmdline=yes; speech_cmdline_reason=default
49 speech_speech_dispatcher=yes; speech_speech_dispatcher_reason=default
50 vehicle_demo=yes; vehicle_demo_reason=default
51 vehicle_file=yes; vehicle_file_reason=default
52 vehicle_gpsd=yes; vehicle_gpsd_reason=default
53 vehicle_gypsy=yes; vehicle_gypsy_reason=default
54 vehicle_wince=no; vehicle_wince_reason=default
56 m4_ifndef([AC_USE_SYSTEM_EXTENSIONS],
57 [AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], [AC_GNU_SOURCE])])
59 AC_USE_SYSTEM_EXTENSIONS
62 if eval "test x$GCC = xyes"; then
63 CFLAGS="$CFLAGS -Wall -Wcast-align -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wreturn-type -D_GNU_SOURCE"
68 if eval "test x$GXX = xyes"; then
69 CXXFLAGS="$CXXFLAGS -Wall -Wcast-align -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wreturn-type -D_GNU_SOURCE"
73 if test "x${cross_compiling}" = "xyes"; then
74 samplemap="no";samplemap_reason="not supported for cross compiling"
75 binding_python="no";binding_python_reason="not supported for cross compiling"
76 postgresql="no";postgresql_reason="not supported for cross compiling"
77 AC_MSG_CHECKING([for a C compiler for build tools])
78 AC_CHECK_PROGS(CC_FOR_BUILD, gcc cc)
82 CCLD_FOR_BUILD="$CC_FOR_BUILD"
83 AC_SUBST(cross_compiling)
84 AC_SUBST(CC_FOR_BUILD)
85 AC_SUBST(CCLD_FOR_BUILD)
87 AC_ARG_ENABLE(avoid-unaligned, [ --enable-avoid-unaligned avoid unaligned accesses], AVOID_UNALIGNED=$enableval, AVOID_UNALIGNED=no)
88 test x"${AVOID_UNALIGNED}" = xyes && AC_DEFINE(AVOID_UNALIGNED,[],Define to avoid unaligned access)
90 AC_ARG_ENABLE(avoid-float, [ --enable-avoid-float avoid floating point calculations], AVOID_FLOAT=$enableval, AVOID_FLOAT=no)
91 test x"${AVOID_FLOAT}" = xyes && AC_DEFINE(AVOID_FLOAT,[],Define to avoid floating point)
93 AC_ARG_ENABLE(hildon, [ --enable-hildon build with maemo/hildon support], enable_hildon=$enableval, enable_hildon=no)
94 if test "x${enable_hildon}" = "xyes" ; then
95 PKG_CHECK_MODULES(HILDON, hildon-1 >= 0.9.9, , [
99 if test x"${enable_hildon}" = xyes ; then
100 AC_DEFINE(USE_HILDON, 1, [Build with maemo/hildon support])
101 AC_SUBST(HILDON_CFLAGS)
102 AC_SUBST(HILDON_LIBS)
105 AM_CONDITIONAL(USE_HILDON, test "${enable_hildon}" = "xyes")
107 AC_ARG_ENABLE(garmin, [ --disable-garmin disable garmin support], USE_GARMIN=$enableval, USE_GARMIN=yes)
110 AC_PATH_PROG(_PATH_BZCAT,[bzcat])
111 if test "x${_PATH_BZCAT}" = "x" ; then
112 samplemap=no; samplemap_reason="bzcat missing"
114 AC_ARG_ENABLE(samplemap, [ --disable-samplemap don't build the samplemap], samplemap=$enableval;samplemap_reason="configure parameter")
115 AM_CONDITIONAL(BUILD_SAMPLEMAP, [test "x$samplemap" = "xyes"])
117 AC_ARG_ENABLE(fastmath, [ --disable-fastmath don't build with fastmath], fastmath=$enableval, fastmath=yes)
118 AM_CONDITIONAL(FASTMATH, [test "x$fastmath" = "xyes"])
120 if test x"$fastmath" = xyes; then
121 if eval "test x$GCC = xyes"; then
122 CFLAGS="$CFLAGS -ffast-math"
126 X_CFLAGS="-I$x_includes"
127 AS_IF([test -n "$ac_x_libraries"], [X_LIBS="-L$ac_x_libraries"])
129 PKG_CHECK_MODULES(GLIB, [glib-2.0 gthread-2.0], [glib=yes],[glib=no])
130 if test "x${glib}" = "xyes"; then
131 AC_DEFINE(HAVE_GLIB, 1, [Define to 1 if you have (external) glib library])
133 GLIB_CFLAGS="-I\$(top_srcdir)/navit/support -I\$(top_srcdir)/navit/support/glib -I\$(top_srcdir)/navit/support/ezxml"
134 GLIB_LIBS="-L\$(top_builddir)/navit/support/glib -lsupport_glib -L\$(top_builddir)/navit/support/ezxml -lsupport_ezxml"
138 PKG_CHECK_MODULES(GMODULE, [gmodule-2.0], [gmodule=yes], [gmodule=no])
139 if test "x${gmodule}" = "xyes"; then
140 AC_DEFINE(HAVE_GMODULE, 1, [Define to 1 if you have gmodule])
142 AC_CHECK_LIB(dl, dlopen,
143 [plugins_reason="default, via dlopen";GMODULE_LIBS="-ldl";AC_DEFINE(HAVE_DLOPEN, 1, [Define to 1 if you have dlopen])],
144 [plugins="no"; plugins_reason="package gmodule and dlopen missing"]
148 AC_ARG_ENABLE(plugins, [ --disable-plugins disable plugins], [ plugins=$enableval;plugin_reason="configure parameter" ])
149 if test "x${plugins}" = "xyes"; then
155 Define to 1 if you have plugins.
161 AM_CONDITIONAL(PLUGINS, [test "x$plugins" = "xyes"])
164 AM_CONDITIONAL(EVENT_GLIB, [test "x$glib" = "xyes"])
165 AM_CONDITIONAL(SUPPORT_GLIB, [test "x$glib" = "xno"])
166 AM_CONDITIONAL(SUPPORT_EZXML, [test "x$glib" = "xno"])
167 AM_CONDITIONAL(DATA_POI_GEODOWNLOAD, [test "x$glib" = "xyes"])
174 Define to 1 if you have the <zlib.h> header file.
178 ZLIB_CFLAGS="-I\$(top_srcdir)/navit/support/zlib"
179 ZLIB_LIBS="-L\$(top_builddir)/navit/support/zlib -lsupport_zlib"
182 AM_CONDITIONAL(SUPPORT_ZLIB, [test "x$zlib" = "xno"])
183 AC_SUBST(ZLIB_CFLAGS)
187 PKG_CHECK_MODULES(GTK2, [gtk+-2.0], [gtk2_pkgconfig=yes], [gtk2_pkgconfig=no])
188 if test "x$gtk2_pkgconfig" = "xyes"; then
189 AC_DEFINE(HAVE_GTK2, 1, [Define to 1 if you have gtk2])
190 graphics_gtk_drawing_area=yes; graphics_gtk_drawing_area_reason="gtk+-2.0 present"
191 gui_gtk=yes; gui_gtk_reason="gtk+-2.0 present"
195 AC_MSG_CHECKING(for fsync)
196 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))
199 AC_MSG_CHECKING(for system)
200 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))
202 AC_ARG_ENABLE(directfb, [ --enable-directfb enable directfb gui and graphics], MODULE_DIRECTFB=$enableval, MODULE_DIRECTFB=no)
204 if test "x$MODULE_DIRECTFB" = "xyes"; then
205 PKG_CHECK_MODULES(DIRECTFB, [directfb], [directfb_pkgconfig=yes], [directfb_pkgconfig=no])
206 if test "x$directfb_pkgconfig" = "xyes"; then
207 AC_DEFINE(HAVE_DIRECTFB, 1, [Define to 1 if you have directfb])
211 DIRECTFB_CFLAGS="$DIRECTFB_CFLAGS"
213 #DIRECTFB_CFLAGS="-D_REENTRANT -I/data/oe/tmp/staging/arm-angstrom-linux-gnueabi/usr/include/directfb/"
214 #DIRECTFB_LIBS="-L/data/oe/tmp/staging/arm-angstrom-linux-gnueabi/usr/lib/ -ldirectfb -lfusion -ldirect -lpthread"
216 AC_SUBST(DIRECTFB_CFLAGS)
217 AC_SUBST(DIRECTFB_LIBS)
218 AM_CONDITIONAL(DIRECTFB, [test "x$directfb_pkgconfig" = "xyes"])
221 AC_ARG_ENABLE(graphics-sdl, [ --disable-graphics-sdl don't create graphics sdl], enable_graphics_sdl=$enableval, enable_graphics_sdl=yes)
222 if test "x${enable_graphics_sdl}" = "xyes" ; then
223 if test -z "$SDL_CONFIG"; then
224 AC_PATH_PROG([SDL_CONFIG], [sdl-config], [])
227 if test "x${enable_graphics_sdl}" = "xyes" ; then
228 AC_MSG_CHECKING([for SDL libraries with $SDL_CONFIG])
229 if test ! -x "$SDL_CONFIG"; then
230 enable_graphics_sdl = "no"
233 SDL_CFLAGS="`$SDL_CONFIG --cflags`"
234 SDL_LIBS="`$SDL_CONFIG --libs`"
240 if test "x${enable_graphics_sdl}" = "xyes" ; then
241 save_CPPFLAGS=$CPPFLAGS
242 CPPFLAGS="$($SDL_CONFIG --cflags) $CPPFLAGS"
243 AC_CHECK_HEADER(SDL_image.h,SDL_IMAGE_LIBS=-lSDL_image,enable_graphics_sdl=no)
244 AC_SUBST(SDL_IMAGE_LIBS)
245 CPPFLAGS=$save_CPPFLAGS
247 if test "x${enable_graphics_sdl}" = "xyes" ; then
248 AC_DEFINE(USE_GRAPICS_SDL, 1, [Build with graphics sdl])
250 AM_CONDITIONAL(USE_GRAPHICS_SDL, test "x${enable_graphics_sdl}" = "xyes")
252 AC_ARG_ENABLE(postgresql, [ --disable-postgresql don't add postgresql support to osm2navit], postgresql=$enableval;postgresql_reason="configure parameter")
253 if test "x${postgresql}" = "xyes" ; then
254 if test -z "$PG_CONFIG"; then
255 AC_PATH_PROG([PG_CONFIG], [pg_config], [])
257 AC_MSG_CHECKING([for PostgreSQL libraries with $PG_CONFIG])
258 if test ! -x "$PG_CONFIG"; then
259 if test "x${PG_CONFIG}" = "x" ; then
260 postgresql_reason="$PG_CONFIG not executable"
262 postgresql_reason="pg_config missing"
267 POSTGRESQL_CFLAGS="-I`$PG_CONFIG --includedir`"
268 POSTGRESQL_LIBS="-L`$PG_CONFIG --libdir` -lpq"
269 AC_DEFINE(HAVE_POSTGRESQL, 1, [Postgresql libraries available])
270 AC_SUBST(POSTGRESQL_CFLAGS)
271 AC_SUBST(POSTGRESQL_LIBS)
275 AM_CONDITIONAL(HAVE_POSTGRESQL, test "x${postgresql}" = "xyes")
277 PKG_CHECK_MODULES(FREETYPE2, [freetype2], [freetype2_pkgconfig=yes], [freetype2_pkgconfig=no])
278 if test "x$freetype2_pkgconfig" = "xyes"; then
279 AC_DEFINE(HAVE_FREETYPE2, 1, [Define to 1 if you have freetype2])
281 AC_SUBST(FREETYPE2_CFLAGS)
282 AC_SUBST(FREETYPE2_LIBS)
283 AM_CONDITIONAL(FONT_FREETYPE, test "x${freetype2_pkgconfig}" = "xyes")
285 PKG_CHECK_MODULES(FONTCONFIG, [fontconfig], [fontconfig_pkgconfig=yes], [fontconfig_pkgconfig=no])
286 if test "x$fontconfig_pkgconfig" = "xyes"; then
287 AC_DEFINE(HAVE_FONTCONFIG, 1, [Define to 1 if you have fontconfig])
289 AC_SUBST(FONTCONFIG_CFLAGS)
290 AC_SUBST(FONTCONFIG_LIBS)
292 PKG_CHECK_MODULES(IMLIB2, [imlib2], [imlib2_pkgconfig=yes], [imlib2_pkgconfig=no])
293 if test "x$imlib2_pkgconfig" = "xyes"; then
294 AC_DEFINE(HAVE_IMLIB2, 1, [Define to 1 if you have imlib2])
296 AC_SUBST(IMLIB2_CFLAGS)
297 AC_SUBST(IMLIB2_LIBS)
301 AC_ARG_ENABLE(gui-sdl, [ --disable-gui-sdl don't create gui sdl ], MODULE_GUI_SDL=$enableval, MODULE_GUI_SDL=yes)
302 if test "x$MODULE_GUI_SDL" = "xyes"; then
308 Define to 1 if you have the <SDL/SDL.h> header file.
312 AC_MSG_WARN([*** no SDL/SDL.h -- SDL support disabled])
318 [CEGUI-OPENGL >= 0.5.0],
323 [Define to 1 if you have the @<:@CEGUI/CEGUI.h@:>@ header file.])
326 [AC_MSG_WARN([*** CEGUI not found -- SDL support disabled])]
334 Define to 1 if you have the <X11/Xmu/Xmu.h> header file.
337 AC_MSG_WARN([*** no X11/Xmu/Xmu.h -- opengl and SDL support disabled])
340 AC_ARG_ENABLE(graphics-opengl, [ --disable-graphics-opengl disable graphics type OpenGL], graphics_opengl=$enableval;graphics_opengl_reason="configure parameter")
341 if test "x${graphics_opengl}" = "xyes" ; then
348 Define to 1 if you have the <GL/gl.h> header file.
350 OPENGL_LIBS="$X_LIBS -lGL -lGLU"
352 AC_MSG_WARN([*** no GL/gl.h -- opengl and SDL support disabled];graphics_opengl=no;graphics_opengl_reason="Headers missing")
360 Define to 1 if you have the <GL/glut.h> header file.
363 AC_MSG_WARN([*** no GL/glut.h -- opengl and SDL support disabled]);graphics_opengl=no;graphics_opengl_reason="Headers missing"
366 AC_SUBST(OPENGL_CFLAGS)
367 AC_SUBST(OPENGL_LIBS)
374 Define to 1 if you have the <GL/glc.h> header file.
378 AC_MSG_WARN([*** no GL/glc.h -- opengl and SDL support disabled])
384 if test x"$cegui" = xyes
386 # Save the LIBS into a temp var since AC_CHECK_LIB adds the lib into LIBS
387 # and we want just to check and use CEGUI_LIBS
389 # For CEGUI, we have to check the presence of some libraries.
390 # The following are mandatory (used by navit)
391 # If the user installed NavIt without, issue a warning and disable CEGUI
392 AC_CHECK_LIB(CEGUIBase, main,
395 echo "Error! Something is wrong with CEGUIBase. Do you have at least cegui-0.5?"
397 AC_CHECK_LIB(CEGUIOpenGLRenderer, main,
400 echo "Error! Something is wrong with CEGUIOpenGLRenderer. Do you have at least cegui-0.5? "
402 AC_CHECK_LIB(CEGUIFalagardWRBase, main,
405 echo "Error! Something is wrong with CEGUIFalagardWRBase. Do you have at least cegui-0.5?"
407 CEGUI_LIBS="-lCEGUIBase -lCEGUIOpenGLRenderer -lCEGUIFalagardWRBase"
409 # The following are optional, but we need to link against them if cegui was built with them
410 AC_CHECK_LIB(CEGUIXercesParser, main,
411 [CEGUI_LIBS="$CEGUI_LIBS -lCEGUIXercesParser"],
412 [echo "CEGUIXercesParser not found/not working, disabled."],
416 AC_CHECK_LIB(CEGUIExpatParser, main,
417 [CEGUI_LIBS="$CEGUI_LIBS -lCEGUIExpatParser"],
418 [echo "CEGUIExpatParser not found/not working, disabled."],
422 AC_CHECK_LIB(CEGUILibxmlParser, main,
423 [CEGUI_LIBS="$CEGUI_LIBS -lCEGUILibxmlParser"],
424 [echo "CEGUILibxmlParser not found/not working, disabled."],
428 AC_CHECK_LIB(CEGUITinyXMLParser, main,
429 [CEGUI_LIBS="$CEGUI_LIBS -lCEGUITinyXMLParser"],
430 [echo "CEGUITinyXMLParser not found/not working, disabled."],
434 AC_CHECK_LIB(CEGUIDevILImageCodec, main,
436 CEGUI_LIBS="$CEGUI_LIBS -lCEGUIDevILImageCodec"
437 AC_DEFINE([HAVE_LIBCEGUIDEVILIMAGECODEC],[1],Define to 1 to use DevIL codec)
439 [echo "CEGUIDevILImageCodec not found/not working, disabled."],
443 AC_CHECK_LIB(CEGUITGAImageCodec, createImageCodec,
445 CEGUI_LIBS="$CEGUI_LIBS -lCEGUITGAImageCodec"
446 AC_DEFINE(HAVE_LIBCEGUITGAIMAGECODEC,[1],Define to 1 to use the TGA codec)
448 [echo "GUITGAImageCodec not found/not working, disabled."],
452 libssilly="$OPENGL_LIBS -lpng"
453 AC_CHECK_LIB(CEGUISILLYImageCodec, createImageCodec,
455 CEGUI_LIBS="$CEGUI_LIBS -lCEGUISILLYImageCodec"
456 AC_DEFINE([HAVE_LIBCEGUISILLYIMAGECODEC],[1],Define to 1 to use SILLY codec)
458 [echo "CEGUISILLYImageCodec not found/not working, disabled."],
463 echo "CEGUI_LIBS : $CEGUI_LIBS"
466 AC_SUBST(CEGUI_CFLAGS)
469 AM_CONDITIONAL(GUI_SDL, [test "x$sdl" = "xyes" -a "x$cegui" = "xyes" -a "x$opengl" = "xyes" -a "x$glc" = "xyes" -a "x$xmu" = "xyes" ])
470 AM_CONDITIONAL(GRAPHICS_OPENGL, [test "x$glut" = "xyes" - "x$opengl" = "xyes" -a "x$glc" = "xyes" ])
472 AC_ARG_ENABLE(gui-clutter, [ --disable-gui-clutter don't create gui clutter ], MODULE_GUI_CLUTTER=$enableval, MODULE_GUI_CLUTTER=yes)
473 if test "x$MODULE_GUI_CLUTTER" = "xyes"; then
474 PKG_CHECK_MODULES(CLUTTER, [clutter-0.8], [clutter_pkgconfig=yes], [clutter_pkgconfig=no])
475 if test "x$clutter_pkgconfig" = "xyes"; then
476 AC_DEFINE(HAVE_CLUTTER, 1, [Define to 1 if you have clutter])
480 AC_SUBST(CLUTTER_CFLAGS)
481 AC_SUBST(CLUTTER_LIBS)
482 AM_CONDITIONAL(GUI_CLUTTER, [test "x$clutter_pkgconfig" = "xyes" -a "x$glc" = "xyes" ])
487 if test x"${USE_GARMIN}" = xyes
489 # check for libgarmin
490 PKG_CHECK_MODULES(LIBGARMIN, libgarmin, use_libgarmin=yes, use_libgarmin=no)
491 AC_SUBST(LIBGARMIN_CFLAGS)
492 AC_SUBST(LIBGARMIN_LIBS)
494 AM_CONDITIONAL(HAVELIBGARMIN, [test "x$use_libgarmin" = "xyes"])
498 AC_ARG_ENABLE(binding-python, [ --disable-binding-python don't create binding python], binding_python=$enableval;binding_python_reason="configure parameter")
499 if test "x${binding_python}" = "xyes"; then
500 AC_PATH_PROG(_PATH_PYTHON,[python])
501 dnl Libraries and flags for embedded Python.
502 dnl FIXME: I wish there was a less icky way to get this.
503 if test "x${_PATH_PYTHON}" != "x" ; then
504 AC_MSG_CHECKING(for Python linkage)
505 py_prefix=`$_PATH_PYTHON -c 'import sys; print sys.prefix'`
506 py_ver=`$_PATH_PYTHON -c 'import sys; print sys.version[[:3]]'`
507 py_libdir="${py_prefix}/lib64/python${py_ver}"
508 if ! test -d $py_libdir; then
509 py_libdir="${py_prefix}/lib/python${py_ver}"
511 PYTHON_CFLAGS="-I${py_prefix}/include/python${py_ver}"
512 if test -f $py_libdir/config/Makefile -a -f $py_prefix/include/python${py_ver}/Python.h; then
513 py_libs=`grep '^LIBS=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
514 py_libc=`grep '^LIBC=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
515 py_libm=`grep '^LIBM=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
516 py_liblocalmod=`grep '^LOCALMODLIBS=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
517 py_libbasemod=`grep '^BASEMODLIBS=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
518 PYTHON_LIBS="-L$py_libdir/config $py_libs $py_libc $py_libm -lpython$py_ver $py_liblocalmod $py_libbasemod"
519 PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/[ \\t]*/ /g'`
520 AC_MSG_RESULT($py_libdir)
523 binding_python_reason="$py_libdir/config/Makefile or $py_prefix/include/python${py_ver}/Python.h missing"
527 binding_python_reason="python executable missing"
530 if test "x${binding_python}" = xyes ; then
531 AC_DEFINE(USE_BINDING_PYTHON, 1, [Build with binding python])
533 AC_SUBST(PYTHON_CFLAGS)
534 AC_SUBST(PYTHON_LIBS)
535 AM_CONDITIONAL(BINDING_PYTHON, test "x${binding_python}" = "xyes")
538 AC_ARG_ENABLE(binding-dbus, [ --disable-binding-dbus don't create binding dbus], binding_dbus=$enableval;binding_dbus_reason="configure parameter")
539 if test "x${binding_dbus}" = "xyes" ; then
540 PKG_CHECK_MODULES(DBUS, [dbus-glib-1], ,binding_dbus=no)
542 if test "x${binding_dbus}" = "xyes" ; then
543 AC_DEFINE(USE_BINDING_DBUS, 1, [Build with binding dbus])
545 AC_SUBST(DBUS_CFLAGS)
547 AM_CONDITIONAL(BINDING_DBUS, test "x${binding_dbus}" = "xyes")
550 AC_ARG_ENABLE(svg, [ --disable-svg disable Scalable Vector Graphics], enable_svg=$enableval, enable_svg=yes)
551 AC_ARG_ENABLE(svg2png, [ --disable-svg2png disable conversion of svgs to pngs], enable_svg2png=$enableval, enable_svg2png=yes)
552 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")
553 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="")
554 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="")
555 if test "x${enable_svg2png}" = "xyes" ; then
556 AC_PATH_PROG([KSVGTOPNG], [ksvgtopng], [])
557 if test ! -x "$KSVGTOPNG"; then
561 AC_SUBST(SVG2PNG_SCALES)
562 AC_SUBST(SVG2PNG_SCALES_FLAG)
563 AC_SUBST(SVG2PNG_SCALES_NAV)
564 AM_CONDITIONAL(USE_SVG2PNG_SCALES, test "x${SVG2PNG_SCALES}" != "xyes" -a "x${SVG2PNG_SCALES}" != "x")
565 AM_CONDITIONAL(USE_SVG2PNG_SCALES_FLAG, test "x${SVG2PNG_SCALES_FLAG}" != "xyes" -a "x${SVG2PNG_SCALES_FLAG}" != "x")
566 AM_CONDITIONAL(USE_SVG2PNG_SCALES_NAV, test "x${SVG2PNG_SCALES_NAV}" != "xyes" -a "x${SVG2PNG_SCALES_NAV}" != "x")
567 AM_CONDITIONAL(USE_SVG2PNG, test "x${enable_svg2png}" = "xyes")
568 AM_CONDITIONAL(USE_SVG, test "x${enable_svg}" = "xyes")
573 [ --disable-nls disable Native Language Support ( gettext/libintl )],
574 enable_nls=$enableval, enable_nls=yes)
582 if test "x$enable_nls" = "xyes"; then
584 AC_CHECK_FUNC(gettext, [HAVEGETTEXT="yes"]
585 AC_CHECK_LIB(intl, gettext, [INTLIBS="-lintl" HAVEGETTEXT="yes"],
588 AC_CHECK_PROG(XGETTEXT, xgettext, xgettext)
589 AC_CHECK_PROG(MSGMERGE, msgmerge, msgmerge)
590 AC_CHECK_PROG(MSGFMT, msgfmt, msgfmt)
592 if test "$XGETTEXT" != ""; then
593 if $XGETTEXT --help 2>&1 | grep illegal >/dev/null ; then
594 echo "xgettext isn't GNU version"
599 if test "$XGETTEXT" != "" -a "$HAVEGETTEXT" != ""; then
601 if test "$LINGUAS" = ""; then
602 ling=` (cd $srcdir/po; /bin/ls *.po.in) `
604 lcode=`basename $l .po.in`
605 LINGUAS="$LINGUAS$lcode "
608 AC_DEFINE(ENABLE_NLS, [1], [NLS Please])
609 echo "xgettext and gettext() exist; will build i18n support for $LINGUAS"
613 echo "xgettext and libintl.a don't both exist; will not build i18n support"
616 for lang in $LINGUAS; do
617 MOFILES="$MOFILES $lang.mo"
619 for lang in $LINGUAS; do
620 POFILES="$POFILES $lang.po"
626 AM_GNU_GETTEXT_VERSION
627 AM_GNU_GETTEXT(no-libtool, need-ngettext, \$(top_builddir)/intl/)
630 if test x"$LIBINTL" != "x" ;then
631 CFLAGS="$CFLAGS -I\$(top_builddir)/intl/"
635 AM_CONDITIONAL(ENABLE_NLS, [test "x$enable_nls" = "xyes"])
641 [Define to 1 if you have byteswap.h],
647 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
648 AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
652 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")
653 AM_CONDITIONAL(SUPPORT_WORDEXP, [test "x$wordexp_h" = "xno"])
662 AC_DEFINE(HAVE_API_WIN32_BASE, 1, [Have Windows Base API])
663 AC_DEFINE(HAVE_API_WIN32_CE, 1, [Have Windows CE API])
664 gui_win32=yes; gui_win32_reason="host_os is wince"
665 graphics_win32=yes; graphics_win32_reason="host_os is wince"
666 vehicle_wince=yes; vehcile_wince_reason="host_os is wince"
670 AC_DEFINE(HAVE_API_WIN32_BASE, 1, [Have Windows Base API])
671 AC_DEFINE(HAVE_API_WIN32, 1, [Have Windows API])
672 gui_win32=yes; gui_win32_reason="host_os is mingw32"
673 graphics_win32=yes; graphics_win32_reason="host_os is mingw32"
675 if test "x$win32" = "xyes"
677 NAVIT_CFLAGS="$NAVIT_CFLAGS -I\$(top_srcdir)/navit/support/win32"
678 NAVIT_LIBS="$NAVIT_LIBS -L\$(top_builddir)/navit/support/win32 -lsupport_win32"
680 AM_CONDITIONAL(SUPPORT_WIN32, [test "x$win32" = "xyes"])
681 AM_CONDITIONAL(SUPPORT_WIN32CE, [test "x$win32ce" = "xyes"])
684 if test "$win32" == "no"; then
685 LIBS="$LIBS -rdynamic"
689 AC_ARG_ENABLE(support_libc, [ --enable-support-libc enable builtin mini libc ], support_libc=$enableval)
690 AM_CONDITIONAL(SUPPORT_LIBC, [test "x$support_libc" = "xyes"])
691 if test "x$support_libc" = "xyes"; then
692 CFLAGS="$CFLAGS -I\$(top_srcdir)/navit/support/libc"
697 AC_ARG_ENABLE(graphics-gd, [ --enable-graphics-gd enable graphics type gd], graphics_gd=$enableval;graphics_gd_reason="configure parameter")
698 if test "x${graphics_gd}" = "xyes" ; then
699 if test -z "$GDLIB_CONFIG"; then
700 AC_PATH_PROG([GDLIB_CONFIG], [gdlib-config], [])
702 AC_MSG_CHECKING([for gdlib with $GDLIB_CONFIG])
703 if test ! -x "$GDLIB_CONFIG"; then
704 if test "x${GDLIB_CONFIG}" = "x" ; then
705 graphics_gd_reason="$GDLIB_CONFIG not executable"
707 graphics_gd_reason="gdlib-config missing"
712 GD_CFLAGS="-I`$GDLIB_CONFIG --includedir`"
713 GD_LIBS="-L`$GDLIB_CONFIG --libdir` -lgd `$GDLIB_CONFIG --libs`"
719 AM_CONDITIONAL(GRAPHICS_GD, test "x${graphics_gd}" = "xyes")
721 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")
722 AM_CONDITIONAL(GRAPHICS_GTK_DRAWING_AREA, [test "x${graphics_gtk_drawing_area}" = "xyes"])
724 AC_ARG_ENABLE(graphics-win32, [ --disable-graphics-win32 disable graphics type win32], graphics_win32=$enableval;graphics_win32_reason="configure parameter")
725 AM_CONDITIONAL(GRAPHICS_WIN32, test "x${graphics_win32}" = "xyes")
727 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")
728 if test "x${graphics_qt_qpainter}" = "xyes" -a "x${QT_GUI_CFLAGS}" = "x" -a "x${QT_GUI_LIBS}" = "x"; then
729 PKG_CHECK_MODULES(QT_GUI, [QtGui QtCore], ,graphics_qt_qpainter=no,graphics_qt_qpainter_reason="Packages QtGui and/or QtCore missing")
731 if test "x${graphics_qt_qpainter}" = "xyes" ; then
732 AC_DEFINE(USE_GRAPICS_QT_QPAINTER, 1, [Build with graphics qt_qpainter])
734 AC_SUBST(QT_GUI_CFLAGS)
735 AC_SUBST(QT_GUI_LIBS)
736 AM_CONDITIONAL(GRAPHICS_QT_QPAINTER, test "x${graphics_qt_qpainter}" = "xyes")
740 AC_ARG_ENABLE(gui-gtk, [ --disable-gui-gtk disable gui type gtk ], gui_gtk=$enableval)
741 AM_CONDITIONAL(GUI_GTK, [test "x${gui_gtk}" = "xyes"])
743 AC_ARG_ENABLE(gui-internal, [ --disable-gui-internal disable gui type internal], gui_internal=$enableval;gui_internal_reason="configure parameter")
744 AM_CONDITIONAL(GUI_INTERNAL, test "x${gui_internal}" = "xyes")
746 AC_ARG_ENABLE(gui-win32, [ --disable-gui-win32 disable gui type win32], gui_win32=$enableval;gui_win32_reason="configure parameter")
747 AM_CONDITIONAL(GUI_WIN32, test "x${gui_win32}" = "xyes")
751 AC_ARG_ENABLE(speech-cmdline, [ --disable-speech-cmdline disable speech type cmdline], speech_cmdline=$enableval;speech_cmdline_reason="configure parameter")
752 AM_CONDITIONAL(SPEECH_CMDLINE, test "x${speech_cmdline}" = "xyes")
754 AC_ARG_ENABLE(speech-speechd, [ --disable-speech-speech-dispatcher disable speech type speech-dispatcher], speech_speech_dispatcher=$enableval;speech_speech_dispatcher_reason="configure parameter")
755 if test "x$speech_speech_dispatcher" = "xyes"; then
756 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")
758 AC_SUBST(SPEECHD_CFLAGS)
759 AC_SUBST(SPEECHD_LIBS)
760 AM_CONDITIONAL(SPEECH_SPEECH_DISPATCHER, test "x${speech_speech_dispatcher}" = "xyes")
764 AC_ARG_ENABLE(vehicle-demo, [ --disable-vehicle-demo disable vehicle type demo], vehicle_demo=$enableval;vehicle_demo_reason="configure parameter")
765 AM_CONDITIONAL(VEHICLE_DEMO, test "x${vehicle_demo}" = "xyes")
767 AC_ARG_ENABLE(vehicle-file, [ --disable-vehicle-file disable vehicle type file], vehicle_file=$enableval;vehicle_file_reason="configure parameter")
768 AM_CONDITIONAL(VEHICLE_FILE, test "x${vehicle_file}" = "xyes")
770 if test "x${vehicle_gpsd}" = xyes
772 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" )
774 AC_SUBST(GPSD_CFLAGS)
776 AM_CONDITIONAL(VEHICLE_GPSD, [test "x${vehicle_gpsd}" = "xyes"])
778 AC_ARG_ENABLE(vehicle-gypsy,[ --disable-vehicle-gypsy disable vehicle type gypsy], vehicle_gypsy=$enableval;vehicle_gypsy_reason="configure parameter")
779 if test "x${vehicle_gypsy}" = "xyes"
781 PKG_CHECK_MODULES(GYPSY, gypsy, ,vehicle_gypsy=no;vehicle_gypsy_reason="package gypsy missing")
783 AC_SUBST(GYPSY_CFLAGS)
785 AM_CONDITIONAL(VEHICLE_GYPSY, test "x${vehicle_gypsy}" = "xyes")
787 AC_ARG_ENABLE(vehicle-wince, [ --disable-vehicle-wince disable vehicle type wince], vehicle_wince=$enableval;vehicle_wince_reason="configure parameter")
788 AM_CONDITIONAL(VEHICLE_WINCE, test "x${vehicle_wince}" = "xyes")
790 NAVIT_CFLAGS="$NAVIT_CFLAGS $GLIB_CFLAGS $GMODULE_CFLAGS"
791 NAVIT_LIBS="$NAVIT_LIBS $GLIB_LIBS $GMODULE_LIBS $LIBINTL"
792 AC_SUBST(NAVIT_CFLAGS)
799 navit/binding/Makefile
800 navit/binding/python/Makefile
801 navit/binding/dbus/Makefile
803 navit/data/mg/Makefile
804 navit/data/textfile/Makefile
805 navit/data/binfile/Makefile
806 navit/data/garmin/Makefile
807 navit/data/poi_geodownload/Makefile
808 navit/data/poi_geodownload/libmdb/Makefile
809 navit/data/poi_geodownload/libmdb/include/Makefile
810 navit/fib-1.1/Makefile
812 navit/font/freetype/Makefile
813 navit/graphics/Makefile
814 navit/graphics/gd/Makefile
815 navit/graphics/gtk_drawing_area/Makefile
816 navit/graphics/directfb/Makefile
817 navit/graphics/cogl/Makefile
818 navit/graphics/opengl/Makefile
819 navit/graphics/null/Makefile
820 navit/graphics/sdl/Makefile
821 navit/graphics/qt_qpainter/Makefile
822 navit/graphics/win32/Makefile
824 navit/gui/gtk/Makefile
825 navit/gui/internal/Makefile
826 navit/gui/clutter/Makefile
827 navit/gui/cegui/Makefile
828 navit/gui/cegui/datafiles/Makefile
829 navit/gui/directfb/Makefile
830 navit/gui/win32/Makefile
832 navit/osd/core/Makefile
833 navit/speech/Makefile
834 navit/speech/cmdline/Makefile
835 navit/speech/speech_dispatcher/Makefile
836 navit/support/Makefile
837 navit/support/ezxml/Makefile
838 navit/support/glib/Makefile
839 navit/support/libc/Makefile
840 navit/support/win32/Makefile
841 navit/support/wordexp/Makefile
842 navit/support/zlib/Makefile
843 navit/vehicle/Makefile
844 navit/vehicle/file/Makefile
845 navit/vehicle/gpsd/Makefile
846 navit/vehicle/gypsy/Makefile
847 navit/vehicle/demo/Makefile
848 navit/vehicle/wince/Makefile
854 #src/data/garmin_img/Makefile
861 echo "Summary of your installation :"
862 # FIXME : maybe elaborate missing dependencies
863 if test x"$sdl" != xyes
865 sdl_failures="(libsdl maybe?) "
867 if test x"$xmu" != xyes
869 sdl_failures=$sdl_failures"libxmu "
871 if test x"$glut" != xyes
873 sdl_failures=$sdl_failures"glut "
875 if test x"$glc" != xyes
877 sdl_failures=$sdl_failures"quesoglc "
879 if test x"$cegui" != xyes
881 sdl_failures=$sdl_failures"cegui-devel >= 0.5 "
883 if test -z "$sdl_failures"
885 echo "OpenGL gui : ENABLED, with $CEGUI_LIBS"
887 echo "OpenGL gui : DISABLED : you are missing $sdl_failures"
889 if test x"$directfb_pkgconfig" = xyes
891 echo "DIRECTFB : ENABLED"
893 echo "DIRECTFB : DISABLED"
895 if test x"$clutter_pkgconfig" = xyes
897 echo "Clutter gui : ENABLED"
899 echo "Clutter gui : DISABLED"
901 if test x"$enable_hildon" = xyes
903 echo "Maemo/Hildon: ENABLED"
905 echo "Maemo/Hildon: DISABLED"
907 if test x"${USE_GARMIN}" = xyes
909 if test "x$use_libgarmin" = "xyes"
911 echo "Garmin IMG : ENABLED"
913 echo "Garmin IMG : DISABLED (you don't have libgarmin)"
916 echo "Garmin IMG : DISABLED (you requested it)"
919 if test x"$LIBINTL" = "x" ;then
920 nls_libs="system gettext support"
924 echo "Plugins: $plugins ($plugins_reason)"
925 echo "Postgresql: $postgresql ($postgresql_reason)"
926 echo "Samplemap: $samplemap ($samplemap_reason)"
927 echo "NLS Support: $enable_nls($nls_libs)"
928 echo "Graphics types:"
929 echo " gtk_drawing_area: $graphics_gtk_drawing_area ($graphics_gtk_drawing_area_reason)"
930 echo " qt_qpainter: $graphics_qt_qpainter ($graphics_qt_qpainter_reason)"
931 echo " win32: $graphics_win32 ($graphics_win32_reason)"
932 echo " OpenGL: $graphics_opengl ($graphics_opengl_reason)"
933 echo " gd: $graphics_gd ($graphics_gd_reason)"
936 echo " gtk: $gui_gtk ($gui_gtk_reason)"
937 echo " internal: $gui_internal ($gui_internal_reason)"
938 echo " win32: $gui_win32 ($gui_win32_reason)"
941 echo " cmdline: $speech_cmdline ($speech_cmdline_reason)"
942 echo " speech_dispatcher: $speech_speech_dispatcher ($speech_speech_dispatcher_reason)"
944 echo "Vehicle types:"
945 echo " demo: $vehicle_demo ($vehicle_demo_reason)"
946 echo " file: $vehicle_file ($vehicle_file_reason)"
947 echo " gpsd: $vehicle_gpsd ($vehicle_gpsd_reason)"
948 echo " gypsy: $vehicle_gypsy ($vehicle_gypsy_reason)"
949 echo " wince: $vehicle_wince ($vehicle_wince_reason)"
951 if test "x${gtk2_pkgconfig}" != "xyes" -a "x${sdl}" != "xyes" -a "x${directfb_pkgconfig}" != "xyes" -a "x${gui_win32}" != "xyes" -a "x${gui_internal}" != "xyes"
955 echo "*** WARNING! you have no gui that can be built! ***"
956 echo "Please install the dependency for at least gtk or sdl gui"
957 echo "For more details, see the wiki at http://wiki.navit-project.org/"