# intl sister-directory configuration rules.
|
# intl sister-directory configuration rules.
|
#
|
#
|
|
|
# The idea behind this macro is that there's no need to repeat all the
|
# The idea behind this macro is that there's no need to repeat all the
|
# autoconf probes done by the intl directory - it's already done them
|
# autoconf probes done by the intl directory - it's already done them
|
# for us. In fact, there's no need even to look at the cache for the
|
# for us. In fact, there's no need even to look at the cache for the
|
# answers. All we need to do is nab a few pieces of information.
|
# answers. All we need to do is nab a few pieces of information.
|
# The intl directory is set up to make this easy, by generating a
|
# The intl directory is set up to make this easy, by generating a
|
# small file which can be sourced as a shell script; then we produce
|
# small file which can be sourced as a shell script; then we produce
|
# the necessary substitutions and definitions for this directory.
|
# the necessary substitutions and definitions for this directory.
|
|
|
AC_DEFUN([ZW_GNU_GETTEXT_SISTER_DIR],
|
AC_DEFUN([ZW_GNU_GETTEXT_SISTER_DIR],
|
[# If we haven't got the data from the intl directory,
|
[# If we haven't got the data from the intl directory,
|
# assume NLS is disabled.
|
# assume NLS is disabled.
|
USE_NLS=no AC_SUBST(USE_NLS)
|
USE_NLS=no AC_SUBST(USE_NLS)
|
LIBINTL= AC_SUBST(LIBINTL)
|
LIBINTL= AC_SUBST(LIBINTL)
|
LIBINTL_DEP= AC_SUBST(LIBINTL_DEP)
|
LIBINTL_DEP= AC_SUBST(LIBINTL_DEP)
|
INCINTL= AC_SUBST(INCINTL)
|
INCINTL= AC_SUBST(INCINTL)
|
XGETTEXT= AC_SUBST(XGETTEXT)
|
XGETTEXT= AC_SUBST(XGETTEXT)
|
GMSGFMT= AC_SUBST(GMSGFMT)
|
GMSGFMT= AC_SUBST(GMSGFMT)
|
POSUB= AC_SUBST(POSUB)
|
POSUB= AC_SUBST(POSUB)
|
|
|
if test -f ifelse([$1],,[../intl],[$1])/config.intl; then
|
if test -f ifelse([$1],,[../intl],[$1])/config.intl; then
|
. ifelse([$1],,[../intl],[$1])/config.intl
|
. ifelse([$1],,[../intl],[$1])/config.intl
|
fi
|
fi
|
AC_MSG_CHECKING([whether NLS is requested])
|
AC_MSG_CHECKING([whether NLS is requested])
|
if test x"$USE_NLS" != xyes; then
|
if test x"$USE_NLS" != xyes; then
|
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
else
|
else
|
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
AC_DEFINE(ENABLE_NLS, 1,
|
AC_DEFINE(ENABLE_NLS, 1,
|
[Define to 1 if translation of program messages to the
|
[Define to 1 if translation of program messages to the
|
user's native language is requested.])
|
user's native language is requested.])
|
|
|
AC_MSG_CHECKING(for catalogs to be installed)
|
AC_MSG_CHECKING(for catalogs to be installed)
|
# Look for .po and .gmo files in the source directory.
|
# Look for .po and .gmo files in the source directory.
|
CATALOGS= AC_SUBST(CATALOGS)
|
CATALOGS= AC_SUBST(CATALOGS)
|
XLINGUAS=
|
XLINGUAS=
|
for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
|
for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
|
# If there aren't any .gmo files the shell will give us the
|
# If there aren't any .gmo files the shell will give us the
|
# literal string "../path/to/srcdir/po/*.gmo" which has to be
|
# literal string "../path/to/srcdir/po/*.gmo" which has to be
|
# weeded out.
|
# weeded out.
|
case "$cat" in *\**)
|
case "$cat" in *\**)
|
continue;;
|
continue;;
|
esac
|
esac
|
# The quadruple backslash is collapsed to a double backslash
|
# The quadruple backslash is collapsed to a double backslash
|
# by the backticks, then collapsed again by the double quotes,
|
# by the backticks, then collapsed again by the double quotes,
|
# leaving us with one backslash in the sed expression (right
|
# leaving us with one backslash in the sed expression (right
|
# before the dot that mustn't act as a wildcard).
|
# before the dot that mustn't act as a wildcard).
|
cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
|
cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
|
lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
|
lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
|
# The user is allowed to set LINGUAS to a list of languages to
|
# The user is allowed to set LINGUAS to a list of languages to
|
# install catalogs for. If it's empty that means "all of them."
|
# install catalogs for. If it's empty that means "all of them."
|
if test "x$LINGUAS" = x; then
|
if test "x$LINGUAS" = x; then
|
CATALOGS="$CATALOGS $cat"
|
CATALOGS="$CATALOGS $cat"
|
XLINGUAS="$XLINGUAS $lang"
|
XLINGUAS="$XLINGUAS $lang"
|
else
|
else
|
case "$LINGUAS" in *$lang*)
|
case "$LINGUAS" in *$lang*)
|
CATALOGS="$CATALOGS $cat"
|
CATALOGS="$CATALOGS $cat"
|
XLINGUAS="$XLINGUAS $lang"
|
XLINGUAS="$XLINGUAS $lang"
|
;;
|
;;
|
esac
|
esac
|
fi
|
fi
|
done
|
done
|
LINGUAS="$XLINGUAS"
|
LINGUAS="$XLINGUAS"
|
AC_MSG_RESULT($LINGUAS)
|
AC_MSG_RESULT($LINGUAS)
|
|
|
dnl Set up some additional variables which our po/Make-in files
|
dnl Set up some additional variables which our po/Make-in files
|
dnl may need.
|
dnl may need.
|
|
|
dnl For backward compatibility. Some Makefiles may be using these.
|
dnl For backward compatibility. Some Makefiles may be using these.
|
DATADIRNAME=share
|
DATADIRNAME=share
|
AC_SUBST(DATADIRNAME)
|
AC_SUBST(DATADIRNAME)
|
INSTOBJEXT=.mo
|
INSTOBJEXT=.mo
|
AC_SUBST(INSTOBJEXT)
|
AC_SUBST(INSTOBJEXT)
|
GENCAT=gencat
|
GENCAT=gencat
|
AC_SUBST(GENCAT)
|
AC_SUBST(GENCAT)
|
CATOBJEXT=.gmo
|
CATOBJEXT=.gmo
|
AC_SUBST(CATOBJEXT)
|
AC_SUBST(CATOBJEXT)
|
fi])
|
fi])
|
|
|