include $(top_srcdir)/Makefile.inc
-SUBDIRS=intl navit po
+SUBDIRS=
+if ENABLE_NLS
+SUBDIRS+=intl po
+else
+SUBDIRS+=navit
+endif
pkgdoc_DATA = README
EXTRA_DIST = README COPYRIGHT
+DIST_SUBDIRS=intl po navit
POFILES=""
LINGUAS=""
-if test x$enable_nls = xyes; then
+if test "x$enable_nls" = "xyes"; then
- AC_CHECK_FUNC(gettext, [HAVEGETTEXT="yes"],
+ AC_CHECK_FUNC(gettext, [HAVEGETTEXT="yes"]
AC_CHECK_LIB(intl, gettext, [INTLIBS="-lintl" HAVEGETTEXT="yes"],
INTLIBS="" ))
LINGUAS=""
PO=""
echo "xgettext and libintl.a don't both exist; will not build i18n support"
+ enable_nls = no
fi
for lang in $LINGUAS; do
MOFILES="$MOFILES $lang.mo"
for lang in $LINGUAS; do
POFILES="$POFILES $lang.po"
done
-fi
+AC_SUBST(INTLIBS)
+AC_SUBST(MOFILES)
+AC_SUBST(POFILES)
+AM_GNU_GETTEXT_VERSION
+AM_GNU_GETTEXT(no-libtool, need-ngettext)
+AC_SUBST(LIBINTL)
+AC_SUBST(LTLIBINTL)
+fi
+AM_CONDITIONAL(ENABLE_NLS, [test "x$enable_nls" = "xyes"])
AC_CHECK_HEADER(
byteswap.h,
AC_DEFINE(
,
)
-AC_SUBST(INTLIBS)
-AC_SUBST(MOFILES)
-AC_SUBST(POFILES)
-AM_GNU_GETTEXT_VERSION
-AM_GNU_GETTEXT
-
-LIBS="$LIBS -lm -rdynamic"
+LIBS="$LIBS -lm"
+if test "$win32" == "no"; then
+ LIBS="$LIBS -rdynamic"
+fi
PACKAGE=navit
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
AC_SUBST(GYPSY_LIBS)
AM_CONDITIONAL(VEHICLE_GYPSY, test "x${vehicle_gypsy}" = "xyes")
-NAVIT_CFLAGS="$NAVIT_CFLAGS $GLIB_CFLAGS $GMODULE_CFLAGS -I\$(top_builddir)/intl"
-NAVIT_LIBS="$NAVIT_LIBS $GLIB_LIBS $GMODULE_LIBS -L\$(top_builddir)/intl"
+NAVIT_CFLAGS="$NAVIT_CFLAGS $GLIB_CFLAGS $GMODULE_CFLAGS"
+NAVIT_LIBS="$NAVIT_LIBS $GLIB_LIBS $GMODULE_LIBS $LIBINTL"
AC_SUBST(NAVIT_CFLAGS)
AC_SUBST(NAVIT_LIBS)
else
echo "Garmin IMG : DISABLED (you requested it)"
fi
+
+if test x"$LIBINTL" = "x" ;then
+ nls_libs="system gettext support"
+else
+ nls_libs="$LIBINTL"
+fi
echo "Plugins: $plugins ($plugins_reason)"
echo "Postgresql: $postgresql ($postgresql_reason)"
echo "Samplemap: $samplemap ($samplemap_reason)"
+echo "NLS Support: $enable_nls($nls_libs)"
echo "Graphics types:"
echo " gtk_drawing_area: $graphics_gtk_drawing_area ($graphics_gtk_drawing_area_reason)"
echo " qt_qpainter: $graphics_qt_qpainter ($graphics_qt_qpainter_reason)"
file.h graphics.h gtkext.h gui.h item.h item_def.h keys.h log.h layer.h layout.h main.h map-share.h map.h\
map_data.h mapset.h maptype.h menu.h navigation.h navit.h osd.h \
param.h phrase.h plugin.h point.h plugin_def.h projection.h popup.h route.h profile.h search.h speech.h \
- transform.h track.h util.h vehicle.h window.h xmlconfig.h zipfile.h
+ transform.h track.h util.h vehicle.h window.h xmlconfig.h zipfile.h \
+ navit_nls.h
navit_SOURCES = start.c
navit_LDADD = libnavit.la @NAVIT_LIBS@ @ZLIB_LIBS@ @INTLLIBS@ -Lfib-1.1 -lfib
#include <stdio.h>
#include <stdlib.h>
#include <glib.h>
-#include <libintl.h>
#include "debug.h"
#include "item.h"
#include "country.h"
#include "search.h"
+#include "navit_nls.h"
struct country {
int id;
char *name;
};
-#define gettext_noop(String) String
-#define _(STRING) gettext(STRING)
-#define _n(STRING) gettext_noop(STRING)
-
static struct country country[]= {
{ 20, "AND", "AD", "AND", /* 020 */ _n("Andorra")},
{784, "UAE", "AE", "ARE", /* 784 */ _n("United Arab Emirates")},
#include "glib.h"
#include <stdio.h>
-#include <libintl.h>
#include "navit.h"
#include "config.h"
#include "track.h"
#include "menu.h"
#include "map.h"
+#include "navit_nls.h"
// Specific to this gui :
#include "gui_clutter.h"
#include "glib.h"
#include <stdio.h>
-#include <libintl.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "track.h"
#include "menu.h"
#include "map.h"
-
+#include "navit_nls.h"
#include <directfb.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <libintl.h>
#include <gtk/gtk.h>
#include "debug.h"
#include "destination.h"
#include "country.h"
#include "search.h"
#include "projection.h"
+#include "navit_nls.h"
#define COL_COUNT 8
-#define gettext_noop(String) String
-#define _(STRING) gettext(STRING)
-#define _n(STRING) gettext_noop(STRING)
-
static struct search_param {
struct navit *nav;
struct mapset *ms;
#include <time.h>
#include <math.h>
#include <gtk/gtk.h>
-#include <libintl.h>
#include "item.h"
#include "coord.h"
#include "debug.h"
#include "map.h"
#include "navigation.h"
#include "gui_gtk.h"
-
-
-#define _(STRING) gettext(STRING)
+#include "navit_nls.h"
struct statusbar_priv {
struct gui_priv *gui;
#if !defined(GDK_Book) || !defined(GDK_Calendar)
#include <X11/XF86keysym.h>
#endif
-#include <libintl.h>
#include <gtk/gtk.h>
#include "config.h"
#include "item.h"
#include "vehicle.h"
#include "map.h"
#include "coord.h"
+#include "navit_nls.h"
#ifdef USE_HILDON
#include "hildon-widgets/hildon-defines.h"
#define KEY_RIGHT GDK_Right
#endif
-#define _(text) gettext(text)
-
static gboolean
keypress(GtkWidget *widget, GdkEventKey *event, struct gui_priv *this)
{
#include <string.h>
#include <stdlib.h>
#include <math.h>
-#include <libintl.h>
#include <glib.h>
#include "config.h"
#include "item.h"
#include "track.h"
#include "country.h"
#include "config.h"
+#include "navit_nls.h"
#define STATE_VISIBLE 1
#define STATE_SELECTED 2
#include <process.h>
#include <windows.h>
#include <glib.h>
-#include <libintl.h>
#include "config.h"
#include "plugin.h"
#include "gui.h"
#include "callback.h"
#include <commctrl.h>
#include "debug.h"
+#include "navit_nls.h"
#ifdef __CEGCC__
#include <sipapi.h>
#include <aygshell.h>
#endif
#include <unistd.h>
-#include <libintl.h>
#include "config.h"
#include "file.h"
#include "debug.h"
#include "route.h"
#include "navigation.h"
#include "event.h"
-
-#define _(STRING) gettext(STRING)
+#include "navit_nls.h"
struct map_data *map_data_default;
#include <string.h>
#include <math.h>
#include <glib.h>
-#include <libintl.h>
#include "debug.h"
#include "profile.h"
#include "navigation.h"
#include "navit.h"
#include "callback.h"
#include "plugin.h"
-
-#define _(STRING) gettext(STRING)
+#include "navit_nls.h"
struct suffix {
char *fullname;
#include <unistd.h>
#include <fcntl.h>
#include <glib.h>
-#include <libintl.h>
#include <math.h>
#include "config.h"
#include "debug.h"
#include "layout.h"
#include "log.h"
#include "attr.h"
+#include "navit_nls.h"
-#define _(STRING) gettext(STRING)
/**
* @defgroup navit the navit core instance. navit is the object containing nearly everything: A set of maps, one or more vehicle, a graphics object for rendering the map, a gui object for displaying the user interface, a route object, a navigation object and so on. Be warned that it is theoretically possible to have more than one navit object
* @{
--- /dev/null
+#ifndef __NAVIT_NLS_H__
+#include "config.h"
+
+#ifdef ENABLE_NLS
+#include <libintl.h>
+#define _(STRING) gettext(STRING)
+#define gettext_noop(String) String
+#define _n(STRING) gettext_noop(STRING)
+#else
+#define _(STRING) STRING
+#define _n(STRING) STRING
+#define gettext(STRING) STRING
+static inline const char *ngettext(const char *msgid, const char *msgid_plural, unsigned long int n)
+{
+ if (n == 1) {
+ return msgid;
+ } else {
+ return msgid_plural;
+ }
+}
+#endif
+#define __NAVIT_NLS_H__
+#endif
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
-#include <libintl.h>
#include <glib.h>
#include "popup.h"
#include "debug.h"
#include "item.h"
#include "callback.h"
#include "route.h"
+#include "navit_nls.h"
-#define _(STRING) gettext(STRING)
#if 0
static void
popup_set_no_passing(struct popup_item *item, void *param)
#include <stdlib.h>
#include <glib.h>
#include <getopt.h>
-#include <libintl.h>
#include "config.h"
#include "version.h"
#include "item.h"
#include "xmlconfig.h"
#include "file.h"
#include "search.h"
+#include "navit_nls.h"
-#define _(STRING) gettext(STRING)
static void
print_usage(void)
if SUPPORT_ZLIB
SUBDIRS+=zlib
endif
+if SUPPORT_LIBC
+ SUBDIRS+=libc
+endif
+DIST_SUBDIRS=ezxml glib wordexp win32 zlib libc
include $(top_srcdir)/Makefile.inc
AM_CPPFLAGS = @NAVIT_CFLAGS@ -I$(top_srcdir)/navit -DMODULE=support_libc
noinst_LTLIBRARIES = libsupport_libc.la
-libsupport_libc_la_SOURCES = libc.c libc_init.c libc.h
+libsupport_libc_la_SOURCES = libc.c libc_init.c