3 AM_CONFIG_HEADER(config.h)
9 if eval "test x$GCC = xyes"; then
10 CFLAGS="$CFLAGS -Wall -Wcast-align -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wreturn-type -D_GNU_SOURCE"
13 if eval "test x$G++ = xyes"; then
14 CFLAGS="$CFLAGS -Wall -Wcast-align -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wreturn-type -D_GNU_SOURCE"
19 # CFLAGS="$CFLAGS -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
24 AC_ARG_ENABLE(avoid-unaligned, [ --enable-avoid-unaligned avoid unaligned accesses], AVOID_UNALIGNED=$enableval, AVOID_UNALIGNED=no)
25 test x"${AVOID_UNALIGNED}" = xyes && AC_DEFINE(AVOID_UNALIGNED,[],Define to avoid unaligned access)
27 AC_ARG_ENABLE(avoid-float, [ --enable-avoid-float avoid floating point calculations], AVOID_FLOAT=$enableval, AVOID_FLOAT=no)
28 test x"${AVOID_FLOAT}" = xyes && AC_DEFINE(AVOID_FLOAT,[],Define to avoid floating point)
30 AC_ARG_ENABLE(libgps, [ --disable-libgps don't use libgps], USE_LIBGPS=$enableval, USE_LIBGPS=yes)
33 PKG_CHECK_MODULES(NAVIT, [glib-2.0 gmodule-2.0])
34 AC_SUBST(NAVIT_CFLAGS)
37 AC_ARG_ENABLE(gui-gtk, [ --disable-gui-gtk don't create gui gtk ], MODULE_GUI_GTK=$enableval, MODULE_GUI_GTK=yes)
38 if test "x$MODULE_GUI_GTK" = "xyes"; then
39 PKG_CHECK_MODULES(GTK2, [gtk+-2.0], [gtk2_pkgconfig=yes], [gtk2_pkgconfig=no])
40 if test "x$gtk2_pkgconfig" = "xyes"; then
41 AC_DEFINE(HAVE_GTK2, 1, [Define to 1 if you have imlib2])
46 AM_CONDITIONAL(GUI_GTK, [test "x$gtk2_pkgconfig" = "xyes"])
47 AM_CONDITIONAL(GRAPHICS_GTK_DRAWING_AREA, [test "x$gtk2_pkgconfig" = "xyes"])
49 PKG_CHECK_MODULES(FREETYPE2, [freetype2], [freetype2_pkgconfig=yes], [freetype2_pkgconfig=no])
50 if test "x$freetype2_pkgconfig" = "xyes"; then
51 AC_DEFINE(HAVE_FREETYPE2, 1, [Define to 1 if you have imlib2])
53 AC_SUBST(FREETYPE2_CFLAGS)
54 AC_SUBST(FREETYPE2_LIBS)
56 PKG_CHECK_MODULES(IMLIB2, [imlib2], [imlib2_pkgconfig=yes], [imlib2_pkgconfig=no])
57 if test "x$imlib2_pkgconfig" = "xyes"; then
58 AC_DEFINE(HAVE_IMLIB2, 1, [Define to 1 if you have imlib2])
60 AC_SUBST(IMLIB2_CFLAGS)
64 AC_ARG_ENABLE(speech-speechd, [ --disable-speech-speechd don't create speech speechd ], MODULE_SPEECH_SPEECHD=$enableval, MODULE_SPEECH_SPEECHD=yes)
65 if test "x$MODULE_SPEECH_SPEECHD" = "xyes"; then
66 AC_CHECK_HEADER(libspeechd.h, AC_DEFINE([HAVE_LIBSPEECHD],[],Define to 1 if you have the <libspeechd.h> header file.) SPEECHD_LIBS="-lspeechd" speechd=yes, AC_MSG_WARN([*** no libspeechd.h -- Speech output disabled]))
68 AC_SUBST(SPEECHD_CFLAGS)
69 AC_SUBST(SPEECHD_LIBS)
70 AM_CONDITIONAL(SPEECH_SPEECH_DISPATCHER, [test "x$speechd" = "xyes"])
73 AC_ARG_ENABLE(gui-sdl, [ --disable-gui-sdl don't create gui sdl ], MODULE_GUI_SDL=$enableval, MODULE_GUI_SDL=yes)
74 if test "x$MODULE_GUI_SDL" = "xyes"; then
80 Define to 1 if you have the <SDL/SDL.h> header file.
84 AC_MSG_WARN([*** no SDL/SDL.h -- SDL support disabled])
95 Define to 1 if you have the <CEGUI/CEGUI.h> header file.
97 CEGUI_LIBS="-lCEGUIBase -lCEGUIOpenGLRenderer"
98 CEGUI_CFLAGS="-I /usr/local/include/CEGUI -I /usr/include/CEGUI"
100 AC_MSG_WARN([*** no CEGUI/CEGUI.h -- SDL support disabled])
103 AC_SUBST(CEGUI_CFLAGS)
111 Define to 1 if you have the <GL/gl.h> header file.
113 OPENGL_LIBS="-lGL -lGLU"
115 AC_MSG_WARN([*** no GL/gl.h -- opengl and SDL support disabled])
117 AC_SUBST(OPENGL_CFLAGS)
118 AC_SUBST(OPENGL_LIBS)
125 Define to 1 if you have the <GL/glc.h> header file.
129 AC_MSG_WARN([*** no GL/glc.h -- opengl and SDL support disabled])
134 AM_CONDITIONAL(GUI_SDL, [test "x$sdl" = "xyes" -a "x$cegui" = "xyes" -a "x$opengl" = "xyes" -a "x$glc" = "xyes" ])
135 AM_CONDITIONAL(GRAPHICS_OPENGL, [test "x$opengl" = "xyes" -a "x$glc" = "xyes" ])
137 if test x"${USE_LIBGPS}" = xyes
139 AC_CHECK_HEADER(gps.h, AC_DEFINE([HAVE_LIBGPS],[],Define to 1 if you have the <gps.h> header file.) GPSD_LIBS="-lgps" gpsd=yes, AC_MSG_WARN([*** no gps.h -- gpsd support disabled]))
141 AC_SUBST(GPSD_CFLAGS)
143 AM_CONDITIONAL(VEHICLE_GPSD, [test "x$gpsd" = "xyes"])
145 AC_ARG_ENABLE(binding-python, [ --disable-binding-python don't create binding python ], MODULE_BINDING_PYTHON=$enableval, MODULE_BINDING_PYTHON=yes)
146 if test "$cross_compiling" = no; then
147 if test "x$MODULE_BINDING_PYTHON" = "xyes"; then
148 AC_PATH_PROG(_PATH_PYTHON,[python])
149 dnl Libraries and flags for embedded Python.
150 dnl FIXME: I wish there was a less icky way to get this.
151 if test x"$_PATH_PYTHON" != x ; then
152 AC_MSG_CHECKING(for Python linkage)
153 py_prefix=`$_PATH_PYTHON -c 'import sys; print sys.prefix'`
154 py_ver=`$_PATH_PYTHON -c 'import sys; print sys.version[[:3]]'`
155 py_libdir="${py_prefix}/lib/python${py_ver}"
156 PYTHON_CFLAGS="-I${py_prefix}/include/python${py_ver}"
157 if test -f $py_libdir/config/Makefile ; then
158 py_libs=`grep '^LIBS=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
159 py_libc=`grep '^LIBC=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
160 py_libm=`grep '^LIBM=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
161 py_liblocalmod=`grep '^LOCALMODLIBS=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
162 py_libbasemod=`grep '^BASEMODLIBS=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
163 PYTHON_LIBS="-L$py_libdir/config $py_libs $py_libc $py_libm -lpython$py_ver $py_liblocalmod $py_libbasemod"
164 PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/[ \\t]*/ /g'`
165 AC_DEFINE(HAVE_PYTHON, 1, [Define to 1 if you have python])
167 AC_MSG_RESULT($py_libdir)
169 AC_MSG_WARN([$py_libdir/config/Makefile missing, support for python disabled])
174 AC_MSG_WARN([*** cross compiling, support for python disabled])
176 AC_SUBST(PYTHON_CFLAGS)
177 AC_SUBST(PYTHON_LIBS)
178 AM_CONDITIONAL(BINDING_PYTHON, [test "x$python" = "xyes"])
183 [ --disable-nls disable Native Language Support ( gettext/libintl )],
184 enable_nls=$enableval, enable_nls=yes)
192 if test x$enable_nls = xyes; then
194 AC_CHECK_FUNC(gettext, [HAVEGETTEXT="yes"],
195 AC_CHECK_LIB(intl, gettext, [INTLIBS="-lintl" HAVEGETTEXT="yes"],
198 AC_CHECK_PROG(XGETTEXT, xgettext, xgettext)
199 AC_CHECK_PROG(MSGMERGE, msgmerge, msgmerge)
200 AC_CHECK_PROG(MSGFMT, msgfmt, msgfmt)
202 if test "$XGETTEXT" != ""; then
203 if $XGETTEXT --help 2>&1 | grep illegal >/dev/null ; then
204 echo "xgettext isn't GNU version"
209 if test "$XGETTEXT" != "" -a "$HAVEGETTEXT" != ""; then
211 if test "$LINGUAS" = ""; then
212 ling=` (cd po; /bin/ls *.po) `
214 lcode=`basename $l .po`
215 LINGUAS="$LINGUAS$lcode "
218 AC_DEFINE(ENABLE_NLS, [1], [NLS Please])
219 echo "xgettext and gettext() exist; will build i18n support for $LINGUAS"
223 echo "xgettext and libintl.a don't both exist; will not build i18n support"
225 for lang in $LINGUAS; do
226 MOFILES="$MOFILES $lang.mo"
228 for lang in $LINGUAS; do
229 POFILES="$POFILES $lang.po"
236 AM_GNU_GETTEXT_VERSION
239 LIBS="$LIBS -lm -rdynamic"
242 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
243 AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
251 src/binding/python/Makefile
254 src/data/textfile/Makefile
255 src/data/garmin_img/Makefile
256 src/data/poi_geodownload/Makefile
257 src/data/poi_geodownload/libmdb/Makefile
258 src/data/poi_geodownload/libmdb/include/Makefile
260 src/graphics/Makefile
261 src/graphics/gtk_drawing_area/Makefile
262 src/graphics/opengl/Makefile
263 src/graphics/null/Makefile
267 src/gui/sdl/datafiles/Makefile
269 src/osd/core/Makefile
271 src/speech/cmdline/Makefile
272 src/speech/speech_dispatcher/Makefile
274 src/vehicle/file/Makefile
275 src/vehicle/gpsd/Makefile