[cogl/wip/standalone: 10/13] build: Allow to disable gettext/i18n
- From: Damien Lespiau <dlespiau src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/wip/standalone: 10/13] build: Allow to disable gettext/i18n
- Date: Mon, 27 Feb 2012 17:46:29 +0000 (UTC)
commit 1e522faa72e6540a721da9cffe626f3d89ca9b50
Author: Damien Lespiau <damien lespiau intel com>
Date: Mon Feb 27 16:44:05 2012 +0000
build: Allow to disable gettext/i18n
Makefile.am | 4 ++++
cogl/cogl.c | 2 ++
configure.ac | 11 +++++++++++
3 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 8dde8f4..8fbf07f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,6 +6,10 @@ endif
SUBDIRS += examples doc po build
+if USE_GETTEXT
+SUBDIRS += po
+endif
+
ACLOCAL_AMFLAGS = -I build/autotools ${ACLOCAL_FLAGS}
EXTRA_DIST = \
diff --git a/cogl/cogl.c b/cogl/cogl.c
index e711814..4d55d5e 100644
--- a/cogl/cogl.c
+++ b/cogl/cogl.c
@@ -995,8 +995,10 @@ _cogl_init (void)
if (initialized == FALSE)
{
+#ifdef USE_GETTEXT
bindtextdomain (GETTEXT_PACKAGE, COGL_LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+#endif
g_type_init ();
diff --git a/configure.ac b/configure.ac
index 991b8d2..06f50a2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -958,6 +958,17 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,
[The prefix for our gettext translation domains.])
AS_ALL_LINGUAS
+AC_ARG_ENABLE(
+ [gettext],
+ [AC_HELP_STRING([--enable-gettext=@<:@no/yes@:>@],
+ [Do not build with gettext support])],
+ [],
+ [enable_gettext=yes]
+)
+AM_CONDITIONAL(USE_GETTEXT, [test x"$enable_gettext" = "xyes"])
+AS_IF([test x"$enable_gettext" = "xyes"],
+ [AC_DEFINE([USE_GETTEXT], [1], [Compile with gettext support])]
+)
dnl ================================================================
dnl Documentation stuff.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]