summaryrefslogtreecommitdiff
path: root/m4macros
diff options
context:
space:
mode:
Diffstat (limited to 'm4macros')
-rw-r--r--m4macros/xdt-i18n.m410
1 files changed, 8 insertions, 2 deletions
diff --git a/m4macros/xdt-i18n.m4 b/m4macros/xdt-i18n.m4
index b296647..4335dd6 100644
--- a/m4macros/xdt-i18n.m4
+++ b/m4macros/xdt-i18n.m4
@@ -23,10 +23,13 @@ dnl Internalization M4 macros.
dnl
-dnl XDT_I18N(LINGUAS [, PACKAGE])
+dnl XDT_I18N([LINGUAS][, PACKAGE])
dnl
dnl This macro takes care of setting up everything for i18n support.
dnl
+dnl If LINGUAS isn't specified, it will automatically extract the linguas
+dnl from po/*.po.
+dnl
dnl If PACKAGE isn't specified, it defaults to the package tarname; see
dnl the description of AC_INIT() for an explanation of what makes up
dnl the package tarname. Normally, you don't need to specify PACKAGE,
@@ -40,7 +43,10 @@ AC_DEFUN([XDT_I18N],
AC_SUBST([GETTEXT_PACKAGE])
dnl gettext and stuff
- ALL_LINGUAS="$1"
+ ALL_LINGUAS="m4_ifblank(
+ [$1],
+ [esyscmd([echo $(for i in po/*.po; do test -e "$i" && basename -- "$i" .po; done) | tr -d '\n'])],
+ [$1])"
AM_GLIB_GNU_GETTEXT()
dnl This is required on some Linux systems