+2001-07-22 Bruno Haible <haible@clisp.cons.org>
+
+ * configure.in (ALL_LINGUAS): Remove assignment.
+
2001-08-02 Bruno Haible <haible@clisp.cons.org>
* README: Change bug report address to <bug-gnu-gettext@gnu.org>.
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.13)
-AC_REVISION($Revision: 1.36 $)
+AC_REVISION($Revision: 1.37 $)
AC_INIT(src/msgfmt.c)
AM_INIT_AUTOMAKE(gettext, 0.11)
RELEASE_DATE=2001-05-23 dnl in "date +%Y-%m-%d" format
AM_CONFIG_HEADER(config.h)
-dnl Set of available languages.
-ALL_LINGUAS="cs da de el en@quot en@boldquot es et fr gl id it ja ko nl nn no pl pt pt_BR ru sl sv tr zh"
-
dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
+2001-07-22 Bruno Haible <haible@clisp.cons.org>
+
+ * gettext.texi (po/LINGUAS): New node.
+ (configure.in): Remove paragraph about ALL_LINGUAS.
+
2001-08-02 Bruno Haible <haible@clisp.cons.org>
* gettext.texi (Introduction): Change bug report address to
@menu
* po/POTFILES.in:: @file{POTFILES.in} in @file{po/}
+* po/LINGUAS:: @file{LINGUAS} in @file{po/}
* configure.in:: @file{configure.in} at top level
* config.guess:: @file{config.guess}, @file{config.sub} at top level
* aclocal:: @file{aclocal.m4} at top level
* src/Makefile:: @file{Makefile.in} in @file{src/}
@end menu
-@node po/POTFILES.in, configure.in, Adjusting Files, Adjusting Files
+@node po/POTFILES.in, po/LINGUAS, Adjusting Files, Adjusting Files
@subsection @file{POTFILES.in} in @file{po/}
The @file{po/} directory should receive a file named
of your whole distribution, rather than the location of the
@file{POTFILES.in} file itself.
-@node configure.in, config.guess, po/POTFILES.in, Adjusting Files
+@node po/LINGUAS, configure.in, po/POTFILES.in, Adjusting Files
+@subsection @file{LINGUAS} in @file{po/}
+
+The @file{po/} directory should also receive a file named
+@file{LINGUAS}. This file contains the list of available translations.
+It is a whitespace separated list. Hash-marked comments and white lines
+are ignored. Here is an example file:
+
+@example
+@group
+# Set of available languages.
+de fr
+@end group
+@end example
+
+@noindent
+This example means that German and French PO files are available, so
+that these languages are currently supported by your package. If you
+want to further restrict, at installation time, the set of installed
+languages, this should not be done by modifying the @file{LINGUAS} file,
+but rather by using the @code{LINGUAS} environment variable
+(@pxref{Installers}).
+
+
+@node configure.in, config.guess, po/LINGUAS, Adjusting Files
@subsection @file{configure.in} at top level
@enumerate
should appear in the packaged @code{tar} file name of your distribution
(@file{gettext-@value{VERSION}.tar.gz}, here).
-@item Declare the available translations.
-
-This is done by defining @code{ALL_LINGUAS} to the white separated,
-quoted list of available languages, in a single line, like this:
-
-@example
-ALL_LINGUAS="de fr"
-@end example
-
-@noindent
-This example means that German and French PO files are available, so
-that these languages are currently supported by your package. If you
-want to further restrict, at installation time, the set of installed
-languages, this should not be done by modifying @code{ALL_LINGUAS} in
-@file{configure.in}, but rather by using the @code{LINGUAS} environment
-variable (@pxref{Installers}).
-
@item Check for internationalization support.
Here is the main @code{m4} macro for triggering internationalization
+2001-07-22 Bruno Haible <haible@clisp.cons.org>
+
+ * gettext.m4 (AM_GNU_GETTEXT): Remove computation of CATALOGS.
+ (AM_WITH_NLS): Compute ALL_LINGUAS, GMOFILES, POFILES, CATALOGS while
+ creating po/Makefile from po/Makefile.in. Remove computation of
+ GMOFILES, POFILES during configure.
+
2001-07-22 Bruno Haible <haible@clisp.cons.org>
* gettext.m4 (AM_WITH_NLS): Simplify the logic. Use the same tests
AM_LC_MESSAGES
AM_WITH_NLS([$1],[$2],[$3])
- if test "x$CATOBJEXT" != "x"; then
- if test "x$ALL_LINGUAS" = "x"; then
- LINGUAS=
- else
- AC_MSG_CHECKING(for catalogs to be installed)
- NEW_LINGUAS=
- 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)
- fi
-
- dnl Construct list of names of catalog files to be constructed.
- if test -n "$LINGUAS"; then
- for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
- fi
- fi
-
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
dnl Try to locate is.
rm -f "$ac_dir/POTFILES"
test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
+ # ALL_LINGUAS, GMOFILES, POFILES depend on $ac_dir but don't
+ # depend on user-specified configuration parameters.
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ if test -n "$ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ # Hide the ALL_LINGUAS assigment from automake.
+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+ fi
+ GMOFILES=
+ POFILES=
+ for lang in $ALL_LINGUAS; do
+ GMOFILES="$GMOFILES $lang.gmo"
+ POFILES="$POFILES $lang.po"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ 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
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ done
+ fi
test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
- sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+ sed -e "/POTFILES =/r $ac_dir/POTFILES" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@POFILES@|$POFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
fi
;;
esac
- done])
+ done],
+ [# Capture the value of obsolete $ALL_LINGUAS because we need it to
+ # compute GMOFILES, POFILES, CATALOGS. But hide it from automake.
+ eval 'ALL_LINGUAS''="$ALL_LINGUAS"'
+ # Capture the value of $LINGUAS because we need it to compute CATALOGS.
+ LINGUAS="$LINGUAS"
+ ])
dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
INTLBISON=:
fi
- dnl These rules are solely for the distribution goal. While doing this
- dnl we only have to keep exactly one list of the available catalogs
- dnl in configure.in.
- for lang in $ALL_LINGUAS; do
- GMOFILES="$GMOFILES $lang.gmo"
- POFILES="$POFILES $lang.po"
- done
-
dnl Make all variables we use known to autoconf.
AC_SUBST(BUILD_INCLUDED_LIBINTL)
AC_SUBST(USE_INCLUDED_LIBINTL)
- AC_SUBST(CATALOGS)
AC_SUBST(CATOBJEXT)
- AC_SUBST(GMOFILES)
AC_SUBST(INTLLIBS)
AC_SUBST(INTLOBJS)
- AC_SUBST(POFILES)
AC_SUBST(POSUB)
dnl For backward compatibility. Some configure.ins may be using this.
+2001-07-22 Bruno Haible <haible@clisp.cons.org>
+
+ * automake.diff: New file.
+
2001-08-02 Bruno Haible <haible@clisp.cons.org>
* gettextize.in: Change bug report address to
--- /dev/null
+*** automake.bak Sun Jun 10 16:24:20 2001
+--- automake Sun Jul 22 16:51:04 2001
+***************
+*** 3313,3319 ****
+ }
+ else
+ {
+! &am_error ("AM_GNU_GETTEXT in configure.in but \`ALL_LINGUAS' not defined");
+ }
+ }
+
+--- 3313,3320 ----
+ }
+ else
+ {
+! &am_error ("AM_GNU_GETTEXT in configure.in but po/LINGUAS doesn't exist and \`ALL_LINGUAS' not defined")
+! if ! -f "po/LINGUAS";
+ }
+ }
+
+2001-07-22 Bruno Haible <haible@clisp.cons.org>
+
+ * LINGUAS: New file, extracted from toplevel configure.in.
+
2001-07-22 Bruno Haible <haible@clisp.cons.org>
* Makefile.in.in: Ensure @CATALOGS@ is not used if NLS is disabled.
--- /dev/null
+# Set of available languages.
+cs da de el en@quot en@boldquot es et fr gl id it ja ko nl nn no pl pt pt_BR ru sl sv tr zh