gegl r2016 - in trunk: . gegl



Author: neo
Date: Wed Feb 13 10:00:17 2008
New Revision: 2016
URL: http://svn.gnome.org/viewvc/gegl?rev=2016&view=rev

Log:
2008-02-13  Sven Neumann  <sven gimp org>

	* configure.ac
	* gegl/Makefile.am: define GEGL_LOCALEDIR.

	* gegl/gegl-init.c (gegl_init_i18n): call bindtextdomain().


Modified:
   trunk/ChangeLog
   trunk/configure.ac
   trunk/gegl/Makefile.am
   trunk/gegl/gegl-init.c

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Wed Feb 13 10:00:17 2008
@@ -79,7 +79,9 @@
 GEGL_RELEASE=gegl_api_version
 AC_SUBST(GEGL_RELEASE)
 
-AC_DEFINE_UNQUOTED(GEGL_LIBRARY, "$PACKAGE_NAME-$GEGL_API_VERSION", [name of GEGL library])
+
+AC_DEFINE_UNQUOTED(GEGL_LIBRARY, "$PACKAGE_NAME-$GEGL_API_VERSION",
+                   [The name of the GEGL library])
 
 
 dnl The symbol GEGL_UNSTABLE is defined above for substitution in
@@ -129,15 +131,6 @@
 AM_MAINTAINER_MODE
 
 
-######################
-# gettext i18n support
-######################
-
-GETTEXT_PACKAGE=gegl-$GEGL_API_VERSION
-AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
-                   [The prefix for our gettext translation domains.])
-
-
 ###############
 # Generic stuff
 ###############
@@ -336,6 +329,32 @@
 AC_SUBST(GTK_LIBS)
 
 
+######################
+# gettext i18n support
+######################
+
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "gegl-$GEGL_API_VERSION",
+                   [Our gettext translation domain.])
+
+# GNU format message catalogs go into $datadir/locale,
+# standard location is $libdir/locale. DATADIRNAME set accordingly.
+
+GEGL_LOCALEDIR="$datadir/locale"
+if test "$DATADIRNAME" = "lib"; then
+   GEGL_LOCALEDIR="$libdir/locale"
+fi
+AC_SUBST(GEGL_LOCALEDIR)
+
+# Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
+gegl_save_LIBS=$LIBS
+LIBS="$LIBS $GLIB_LIBS"
+AC_CHECK_FUNCS(bind_textdomain_codeset,,
+  AC_MSG_ERROR([
+*** Check for bind_textdomain_codeset() failed!  This is required.
+]))
+LIBS=$gegl_save_LIBS
+
+
 #########################
 # Disable deprecated APIs
 #########################

Modified: trunk/gegl/Makefile.am
==============================================================================
--- trunk/gegl/Makefile.am	(original)
+++ trunk/gegl/Makefile.am	Wed Feb 13 10:00:17 2008
@@ -51,7 +51,9 @@
 	-I$(top_srcdir)/gegl/operation\
 	@DEP_CFLAGS@ @BABL_CFLAGS@
 
-AM_CPPFLAGS = -DLIBDIR=\""$(libdir)"\"
+AM_CPPFLAGS = \
+	-DLIBDIR=\""$(libdir)"\"	\
+	-DGEGL_LOCALEDIR=\""$(GEGL_LOCALEDIR)"\" 
 
 libgegl_ GEGL_API_VERSION@includedir = $(includedir)/gegl-$(GEGL_API_VERSION)
 

Modified: trunk/gegl/gegl-init.c
==============================================================================
--- trunk/gegl/gegl-init.c	(original)
+++ trunk/gegl/gegl-init.c	Wed Feb 13 10:00:17 2008
@@ -196,6 +196,13 @@
   g_print ("\n");
 }
 
+static void
+gegl_init_i18n (void)
+{
+  bindtextdomain (GETTEXT_PACKAGE, GEGL_LOCALEDIR);
+  bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+}
+
 static gboolean
 gegl_post_parse_hook (GOptionContext *context,
                       GOptionGroup   *group,
@@ -219,6 +226,8 @@
   babl_init ();
   gegl_instrument ("gegl_init", "babl_init", gegl_ticks () - time);
 
+  gegl_init_i18n ();
+
   time = gegl_ticks ();
   if (!module_db)
     {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]