fix gettext stuff

to disable it, pass to configure --disable-nls



SVN revision: 42166
This commit is contained in:
Vincent Torri 2009-09-01 17:27:23 +00:00
parent d0e971620e
commit af6cde97d3
5 changed files with 10 additions and 1115 deletions

File diff suppressed because it is too large Load Diff

View File

@ -2,13 +2,7 @@
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = doc src
if ECORE_HAVE_GETTEXT
SUBDIRS += po
endif
DIST_SUBDIRS = doc src po
SUBDIRS = doc src po
MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess \
@ -46,7 +40,7 @@ MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess \
bin_SCRIPTS =
EXTRA_DIST = config.rpath AUTHORS COPYING COPYING-PLAIN \
EXTRA_DIST = AUTHORS COPYING COPYING-PLAIN \
autogen.sh ecore.supp \
ecore.pc.in \
ecore-con.pc.in \

View File

@ -24,6 +24,9 @@ SNAP=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $4);}'`
version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN"
AC_SUBST(version_info)
AM_GNU_GETTEXT_VERSION([0.12.1])
AM_GNU_GETTEXT([external])
release="ver-pre-svn-04"
case "$host_os" in
mingw32ce* | cegcc*)
@ -82,7 +85,6 @@ want_signature="no"
want_poll="yes"
want_inotify="no"
want_tslib="no"
want_gettext="auto"
# core modules
want_ecore_job="yes"
@ -1060,39 +1062,6 @@ AC_SUBST(requirements_ecore_x)
AC_SUBST(requirements_ecore_win32)
AC_SUBST(requirements_ecore_wince)
AC_ARG_ENABLE([gettext],
[AC_HELP_STRING([--disable-gettext], [disable gettext support and usage.])],
[if test "x${enableval}" = "xyes"; then
want_gettext="yes"
else
want_gettext="no"
fi
],
[want_gettext="auto"]
)
have_gettext="no"
if test "x${want_gettext}" != "xno"; then
AC_CHECK_HEADER([libintl.h], [have_gettext="yes"], [have_gettext="no"])
fi
if test "x${have_gettext}" = "xno"; then
if test "x${want_gettext}" = "xyes"; then
AC_MSG_ERROR([Want gettext support but libintl.h was not found!"])
else
AC_MSG_WARN([libintl.h was not found, gettext support disabled."])
fi
else
AC_DEFINE_UNQUOTED(HAVE_GETTEXT, 1, [Gettext/libintl.h was found and enabled])
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.12.1])
if test "x$LIBINTL" = "x"; then
LIBINTL="$INTLLIBS"
fi
fi
AM_CONDITIONAL(ECORE_HAVE_GETTEXT, test "x${have_gettext}" = "xyes")
AC_OUTPUT([
Makefile
ecore-con.pc

View File

@ -37,7 +37,7 @@ ecore_tree.c \
ecore_value.c \
ecore_thread.c
libecore_la_LIBADD = @dlopen_libs@ @EINA_LIBS@ @EVIL_LIBS@ @WIN32_LIBS@ -lm
libecore_la_LIBADD = @dlopen_libs@ @EINA_LIBS@ @EVIL_LIBS@ @WIN32_LIBS@ @LIBINTL@ -lm
libecore_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @ecore_release_info@
EXTRA_DIST = ecore_private.h

View File

@ -11,11 +11,11 @@
#include <stdarg.h>
#include <ctype.h>
#ifdef HAVE_GETTEXT
#include <libintl.h>
#ifdef ENABLE_NLS
# include <libintl.h>
#else
#define gettext(x) (x)
#define dgettext(domain, x) (x)
# define gettext(x) (x)
# define dgettext(domain, x) (x)
#endif
#define _(x) dgettext("ecore", x)