[longomatch] Use intltool to handle all the translations stuff



commit c84ef91cea8569629b11e9a5ae24da95591c1abd
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Sun Jan 24 19:11:11 2010 +0100

    Use intltool to handle all the translations stuff

 autogen.sh     |   14 ++++++++++++++
 configure.ac   |   13 +++++++++++--
 po/Makefile.am |   40 ----------------------------------------
 3 files changed, 25 insertions(+), 42 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index 56ce873..3498b5b 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -8,6 +8,7 @@ CONFIGURE=configure.ac
 : ${AUTOHEADER=autoheader}
 : ${AUTOMAKE=automake}
 : ${LIBTOOLIZE=libtoolize}
+: ${INTLTOOLIZE=intltoolize}
 : ${ACLOCAL=aclocal}
 : ${LIBTOOL=libtool}
 
@@ -47,6 +48,14 @@ DIE=0
   }
 }
 
+(grep "^IT_PROG_INTLTOOL" $CONFIGURE >/dev/null) && {
+  ($INTLTOOLIZE --version) < /dev/null > /dev/null 2>&1 || {
+    echo
+    echo "**Error**: You must have \`intltool' installed to compile $PROJECT."
+    DIE=1
+  }
+}
+
 if test "$DIE" -eq 1; then
         exit 1
 fi
@@ -70,6 +79,11 @@ esac
     $LIBTOOLIZE --force --copy --automake
 }
 
+(grep "^IT_PROG_INTLTOOL" $CONFIGURE >/dev/null) && {
+    echo "Running $INTLTOOLIZE ..."
+    $INTLTOOLIZE --force --copy --automake
+}
+
 echo "Running $ACLOCAL $aclocalinclude ..."
 $ACLOCAL $aclocalinclude
 
diff --git a/configure.ac b/configure.ac
index 404cd4f..d4adc2e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12,7 +12,6 @@ AC_PROG_CC
 AC_C_CONST
 AC_HEADER_STDC
 
-
 AM_PROG_LIBTOOL
 
 dnl pkg-config
@@ -27,6 +26,16 @@ SHAMROCK_EXPAND_DATADIR
 
 AC_PROG_INSTALL
 
+#*******************************************************************************
+# Internationalization
+#*******************************************************************************
+GETTEXT_PACKAGE=longomatch
+AC_SUBST(GETTEXT_PACKAGE)
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
+
+IT_PROG_INTLTOOL([0.40.0])
+AM_GLIB_GNU_GETTEXT
+
 
 dnl Check for C# compiler
 AC_PATH_PROG(CSC, csc, no)
@@ -108,7 +117,7 @@ dnl package checks, per config
 AC_CONFIG_FILES([
 LongoMatch/Makefile
 CesarPlayer/Makefile
-po/Makefile
+po/Makefile.in
 libcesarplayer/Makefile
 libcesarplayer/src/Makefile
 Makefile



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