1dnl $Id: xdt-i18n.m4 2278 2005-03-08 15:23:49Z benny $ 2dnl 3dnl Copyright (c) 2002-2005 4dnl The Xfce development team. All rights reserved. 5dnl 6dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>. 7dnl 8dnl xdt-i18n 9dnl -------- 10dnl Internalization M4 macros. 11dnl 12 13 14dnl XDT_I18N(LINGUAS [, PACKAGE]) 15dnl 16dnl This macro takes care of setting up everything for i18n support. 17dnl 18dnl If PACKAGE isn't specified, it defaults to the package tarname; see 19dnl the description of AC_INIT() for an explanation of what makes up 20dnl the package tarname. Normally, you don't need to specify PACKAGE, 21dnl but you can stick with the default. 22dnl 23AC_DEFUN([XDT_I18N], 24[ 25 dnl Substitute GETTEXT_PACKAGE variable 26 GETTEXT_PACKAGE=m4_default([$2], [AC_PACKAGE_TARNAME()]) 27 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Name of default gettext domain]) 28 AC_SUBST([GETTEXT_PACKAGE]) 29 30 dnl gettext and stuff 31 ALL_LINGUAS="$1" 32 AM_GLIB_GNU_GETTEXT() 33 34 dnl This is required on some Linux systems 35 AC_CHECK_FUNC([bind_textdomain_codeset]) 36 37 dnl Determine where to install locale files 38 AC_MSG_CHECKING([for locales directory]) 39 AC_ARG_WITH([locales-dir], 40 [AC_HELP_STRING([--with-locales-dir=DIR], [Install locales into DIR])], 41 [localedir=$withval], 42 [ 43 if test x"$CATOBJEXT" = x".mo"; then 44 localedir=$libdir/locale 45 else 46 localedir=$datadir/locale 47 fi 48 ]) 49 AC_MSG_RESULT([$localedir]) 50 AC_SUBST([localedir]) 51 52 dnl Determine additional xgettext flags 53 AC_MSG_CHECKING([for additional xgettext flags]) 54 if test x"$XGETTEXT_ARGS" = x""; then 55 XGETTEXT_ARGS="--keyword=Q_"; 56 else 57 XGETTEXT_ARGS="$XGETTEXT_ARGS --keyword=Q_"; 58 fi 59 AC_SUBST([XGETTEXT_ARGS]) 60 AC_MSG_RESULT([$XGETTEXT_ARGS]) 61]) 62 63 64