[latexila] Autotools: the po/ directory



commit f5eb45611dee6fff5f4f606c10d3dfb45f7f144a
Author: SÃbastien Wilmet <swilmet gnome org>
Date:   Mon Sep 3 00:00:16 2012 +0200

    Autotools: the po/ directory
    
    It requires a more elaborated autogen.sh.

 Makefile.am  |   16 ++++++++++++----
 autogen.sh   |   31 +++++++++++++++++++++++++++++--
 configure.ac |   15 +++++++++++----
 3 files changed, 52 insertions(+), 10 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index acc95f8..6bd001b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,15 @@
 ACLOCAL_AMFLAGS = -I m4
 
-SUBDIRS = data man src
+SUBDIRS = data man po src
 
-EXTRA_DIST =		\
-	HACKING		\
-	latexila.doap
+EXTRA_DIST =			\
+	HACKING			\
+	latexila.doap		\
+	intltool-extract.in	\
+	intltool-merge.in	\
+	intltool-update.in
+
+DISTCLEANFILES =		\
+	intltool-extract	\
+	intltool-merge		\
+	intltool-update
diff --git a/autogen.sh b/autogen.sh
index cd8bec7..3fc321a 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,4 +1,31 @@
 #!/bin/sh
+# Run this to generate all the initial makefiles, etc.
 
-mkdir -p m4
-autoreconf -i
+test -n "$srcdir" || srcdir=`dirname "$0"`
+test -n "$srcdir" || srcdir=.
+
+olddir=`pwd`
+cd "$srcdir"
+
+INTLTOOLIZE=`which intltoolize`
+if test -z $INTLTOOLIZE; then
+        echo "*** No intltoolize found, please install the intltool package ***"
+        exit 1
+fi
+
+AUTORECONF=`which autoreconf`
+if test -z $AUTORECONF; then
+        echo "*** No autoreconf found, please install it ***"
+        exit 1
+fi
+
+if test -z `which autopoint`; then
+        echo "*** No autopoint found, please install it ***"
+        exit 1
+fi
+
+autopoint --force || exit $?
+AUTOPOINT='intltoolize --automake --copy' autoreconf --force --install --verbose
+
+cd "$olddir"
+test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"
diff --git a/configure.ac b/configure.ac
index 094d535..0ebee8b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -67,14 +67,20 @@ AC_SUBST([LATEXILA_CFLAGS])
 AC_SUBST([LATEXILA_LIBS])
 
 # Native Language Support
+IT_PROG_INTLTOOL([0.40.0])
+AM_GNU_GETTEXT_VERSION([0.17])
+AM_GNU_GETTEXT([external])
+
+GETTEXT_PACKAGE=${PACKAGE_TARNAME}
+AC_SUBST([GETTEXT_PACKAGE])
+AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],
+                   ["${GETTEXT_PACKAGE}"],
+                   [The domain to use with gettext])
+
 AC_DEFINE_UNQUOTED([LOCALE_DIR],
                    ["${localedir}"],
 		   [locale directory])
 
-AC_DEFINE([GETTEXT_PACKAGE],
-          ["latexila"],
-	  [gettext package])
-
 # GSettings
 GLIB_GSETTINGS
 
@@ -99,6 +105,7 @@ AC_CONFIG_FILES([Makefile
 		 data/images/Makefile
 		 data/images/app/Makefile
 		 man/Makefile
+		 po/Makefile.in
                  src/Makefile
 		 src/gedit/Makefile
 		 src/resources/Makefile



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