+2001-01-20 Bruno Haible <haible@clisp.cons.org>
+
+ * gettext.m4 (AM_GNU_GETTEXT): Change computation of NEW_LINGUAS to
+ not include catalogs which are not present. Reported by Fredrik
+ Hallenberg. Also include catalogs of which a variant is requested.
+
2001-01-20 Bruno Haible <haible@clisp.cons.org>
* gettext.m4 (AM_WITH_NLS): Add a third argument to AC_DEFINE.
else
AC_MSG_CHECKING(for catalogs to be installed)
NEW_LINGUAS=
- for lang in ${LINGUAS=$ALL_LINGUAS}; do
- case "$ALL_LINGUAS" in
- *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
- esac
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ NEW_LINGUAS="$NEW_LINGUAS $presentlang"
+ fi
done
LINGUAS=$NEW_LINGUAS
AC_MSG_RESULT($LINGUAS)