changeset 3500:c2d624f33028

.
author Jim Meyering <jim@meyering.net>
date Sat, 22 Sep 2001 16:39:57 +0000
parents e37e149e6f40
children 3f81c92e2a08
files lib/Makefile.in m4/ChangeLog m4/Makefile.am m4/Makefile.in m4/gettext.m4
diffstat 5 files changed, 190 insertions(+), 179 deletions(-) [+]
line wrap: on
line diff
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -59,6 +59,7 @@
 host_triplet = @host@
 AMTAR = @AMTAR@
 AWK = @AWK@
+BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
 CATALOGS = @CATALOGS@
 CATOBJEXT = @CATOBJEXT@
 CC = @CC@
@@ -74,15 +75,13 @@
 GMOFILES = @GMOFILES@
 GMSGFMT = @GMSGFMT@
 GNU_PACKAGE = @GNU_PACKAGE@
-GT_NO = @GT_NO@
-GT_YES = @GT_YES@
 HELP2MAN = @HELP2MAN@
-INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
 INSTOBJEXT = @INSTOBJEXT@
-INTLDEPS = @INTLDEPS@
+INTLBISON = @INTLBISON@
 INTLLIBS = @INTLLIBS@
 INTLOBJS = @INTLOBJS@
+INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KMEM_GROUP = @KMEM_GROUP@
 LIBICONV = @LIBICONV@
 LIBOBJS = @LIBOBJS@
@@ -112,7 +111,6 @@
 am__include = @am__include@
 am__quote = @am__quote@
 install_sh = @install_sh@
-l = @l@
 
 AUTOMAKE_OPTIONS = ../src/ansi2knr
 
@@ -610,8 +608,6 @@
 	$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/localcharset.c; then echo $(srcdir)/localcharset.c; else echo localcharset.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > localcharset_.c || rm -f localcharset_.c
 long-options_.c: long-options.c $(ANSI2KNR)
 	$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/long-options.c; then echo $(srcdir)/long-options.c; else echo long-options.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > long-options_.c || rm -f long-options_.c
-lstat_.c: lstat.c $(ANSI2KNR)
-	$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lstat.c; then echo $(srcdir)/lstat.c; else echo lstat.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > lstat_.c || rm -f lstat_.c
 makepath_.c: makepath.c $(ANSI2KNR)
 	$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/makepath.c; then echo $(srcdir)/makepath.c; else echo makepath.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > makepath_.c || rm -f makepath_.c
 malloc_.c: malloc.c $(ANSI2KNR)
@@ -686,8 +682,6 @@
 	$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/savedir.c; then echo $(srcdir)/savedir.c; else echo savedir.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > savedir_.c || rm -f savedir_.c
 sha_.c: sha.c $(ANSI2KNR)
 	$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/sha.c; then echo $(srcdir)/sha.c; else echo sha.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > sha_.c || rm -f sha_.c
-stat_.c: stat.c $(ANSI2KNR)
-	$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/stat.c; then echo $(srcdir)/stat.c; else echo stat.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > stat_.c || rm -f stat_.c
 stime_.c: stime.c $(ANSI2KNR)
 	$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/stime.c; then echo $(srcdir)/stime.c; else echo stime.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > stime_.c || rm -f stime_.c
 stpcpy_.c: stpcpy.c $(ANSI2KNR)
@@ -775,31 +769,30 @@
 group-member_.$(OBJEXT) hard-locale_.$(OBJEXT) hash_.$(OBJEXT) \
 human_.$(OBJEXT) idcache_.$(OBJEXT) isdir_.$(OBJEXT) lchown_.$(OBJEXT) \
 linebuffer_.$(OBJEXT) localcharset_.$(OBJEXT) long-options_.$(OBJEXT) \
-lstat_.$(OBJEXT) makepath_.$(OBJEXT) malloc_.$(OBJEXT) \
-mbswidth_.$(OBJEXT) md5_.$(OBJEXT) memcasecmp_.$(OBJEXT) \
-memchr_.$(OBJEXT) memcmp_.$(OBJEXT) memcoll_.$(OBJEXT) \
-memcpy_.$(OBJEXT) memmove_.$(OBJEXT) memrchr_.$(OBJEXT) \
-memset_.$(OBJEXT) mkdir_.$(OBJEXT) mkstemp_.$(OBJEXT) mktime_.$(OBJEXT) \
+makepath_.$(OBJEXT) malloc_.$(OBJEXT) mbswidth_.$(OBJEXT) \
+md5_.$(OBJEXT) memcasecmp_.$(OBJEXT) memchr_.$(OBJEXT) \
+memcmp_.$(OBJEXT) memcoll_.$(OBJEXT) memcpy_.$(OBJEXT) \
+memmove_.$(OBJEXT) memrchr_.$(OBJEXT) memset_.$(OBJEXT) \
+mkdir_.$(OBJEXT) mkstemp_.$(OBJEXT) mktime_.$(OBJEXT) \
 modechange_.$(OBJEXT) mountlist_.$(OBJEXT) nanosleep_.$(OBJEXT) \
 obstack_.$(OBJEXT) path-concat_.$(OBJEXT) physmem_.$(OBJEXT) \
 posixtm_.$(OBJEXT) putenv_.$(OBJEXT) quote_.$(OBJEXT) \
 quotearg_.$(OBJEXT) readtokens_.$(OBJEXT) readutmp_.$(OBJEXT) \
 realloc_.$(OBJEXT) regex_.$(OBJEXT) rename_.$(OBJEXT) rmdir_.$(OBJEXT) \
 rpmatch_.$(OBJEXT) safe-read_.$(OBJEXT) same_.$(OBJEXT) \
-save-cwd_.$(OBJEXT) savedir_.$(OBJEXT) sha_.$(OBJEXT) stat_.$(OBJEXT) \
-stime_.$(OBJEXT) stpcpy_.$(OBJEXT) strcasecmp_.$(OBJEXT) \
-strcspn_.$(OBJEXT) strdup_.$(OBJEXT) strftime_.$(OBJEXT) \
-stripslash_.$(OBJEXT) strncasecmp_.$(OBJEXT) strndup_.$(OBJEXT) \
-strnlen_.$(OBJEXT) strpbrk_.$(OBJEXT) strstr_.$(OBJEXT) \
-strtod_.$(OBJEXT) strtoimax_.$(OBJEXT) strtol_.$(OBJEXT) \
-strtoll_.$(OBJEXT) strtoul_.$(OBJEXT) strtoull_.$(OBJEXT) \
-strtoumax_.$(OBJEXT) strverscmp_.$(OBJEXT) tempname_.$(OBJEXT) \
-unicodeio_.$(OBJEXT) userspec_.$(OBJEXT) utime_.$(OBJEXT) \
-version-etc_.$(OBJEXT) xgetcwd_.$(OBJEXT) xgethostname_.$(OBJEXT) \
-xmalloc_.$(OBJEXT) xreadlink_.$(OBJEXT) xstrdup_.$(OBJEXT) \
-xstrtod_.$(OBJEXT) xstrtoimax_.$(OBJEXT) xstrtol_.$(OBJEXT) \
-xstrtoul_.$(OBJEXT) xstrtoumax_.$(OBJEXT) yesno_.$(OBJEXT) : \
-$(ANSI2KNR)
+save-cwd_.$(OBJEXT) savedir_.$(OBJEXT) sha_.$(OBJEXT) stime_.$(OBJEXT) \
+stpcpy_.$(OBJEXT) strcasecmp_.$(OBJEXT) strcspn_.$(OBJEXT) \
+strdup_.$(OBJEXT) strftime_.$(OBJEXT) stripslash_.$(OBJEXT) \
+strncasecmp_.$(OBJEXT) strndup_.$(OBJEXT) strnlen_.$(OBJEXT) \
+strpbrk_.$(OBJEXT) strstr_.$(OBJEXT) strtod_.$(OBJEXT) \
+strtoimax_.$(OBJEXT) strtol_.$(OBJEXT) strtoll_.$(OBJEXT) \
+strtoul_.$(OBJEXT) strtoull_.$(OBJEXT) strtoumax_.$(OBJEXT) \
+strverscmp_.$(OBJEXT) tempname_.$(OBJEXT) unicodeio_.$(OBJEXT) \
+userspec_.$(OBJEXT) utime_.$(OBJEXT) version-etc_.$(OBJEXT) \
+xgetcwd_.$(OBJEXT) xgethostname_.$(OBJEXT) xmalloc_.$(OBJEXT) \
+xreadlink_.$(OBJEXT) xstrdup_.$(OBJEXT) xstrtod_.$(OBJEXT) \
+xstrtoimax_.$(OBJEXT) xstrtol_.$(OBJEXT) xstrtoul_.$(OBJEXT) \
+xstrtoumax_.$(OBJEXT) yesno_.$(OBJEXT) : $(ANSI2KNR)
 
 .y.c:
 	$(YACCCOMPILE) $< && mv y.tab.c $@
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,3 +1,12 @@
+2001-09-22  Jim Meyering  <meyering@lucent.com>
+
+	* lcmessage.m4: Sync with gettext -- this changes only comments.
+	* progtest.m4: Likewise
+	* isc-posix.m4: Decrement serial number to sync with gettext.
+	* glibc21.m4: Likewise.
+
+	* libintl.m4: Remove.  No longer used.
+
 2001-09-20  Jim Meyering  <meyering@lucent.com>
 
 	* xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
--- a/m4/Makefile.am
+++ b/m4/Makefile.am
@@ -23,6 +23,7 @@
 getgroups.m4 \
 getline.m4 \
 getloadavg.m4 \
+gettext.m4 \
 gettimeofday.m4 \
 glibc.m4 \
 glibc21.m4 \
@@ -40,7 +41,6 @@
 lchown.m4 \
 lcmessage.m4 \
 lib-check.m4 \
-libintl.m4 \
 link-follow.m4 \
 longlong.m4 \
 ls-mntd-fs.m4 \
--- a/m4/Makefile.in
+++ b/m4/Makefile.in
@@ -134,6 +134,7 @@
 getgroups.m4 \
 getline.m4 \
 getloadavg.m4 \
+gettext.m4 \
 gettimeofday.m4 \
 glibc.m4 \
 glibc21.m4 \
@@ -151,7 +152,6 @@
 lchown.m4 \
 lcmessage.m4 \
 lib-check.m4 \
-libintl.m4 \
 link-follow.m4 \
 longlong.m4 \
 ls-mntd-fs.m4 \
--- a/m4/gettext.m4
+++ b/m4/gettext.m4
@@ -12,7 +12,7 @@
 
 # serial 10
 
-dnl Usage: AM_WITH_NLS([TOOLSYMBOL], [NEEDSYMBOL], [LIBDIR]).
+dnl Usage: AM_GNU_GETTEXT([TOOLSYMBOL], [NEEDSYMBOL], [LIBDIR]).
 dnl If TOOLSYMBOL is specified and is 'use-libtool', then a libtool library
 dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
 dnl    depending on --{enable,disable}-{shared,static} and on the presence of
@@ -40,6 +40,50 @@
 dnl but we keep it in order not to force irrelevant filename changes on the
 dnl maintainers.
 dnl
+AC_DEFUN([AM_GNU_GETTEXT],
+  [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+   AC_REQUIRE([AC_PROG_CC])dnl
+   AC_REQUIRE([AC_CANONICAL_HOST])dnl
+   AC_REQUIRE([AC_PROG_RANLIB])dnl
+   AC_REQUIRE([AC_ISC_POSIX])dnl
+   AC_REQUIRE([AC_HEADER_STDC])dnl
+   AC_REQUIRE([AC_C_CONST])dnl
+   AC_REQUIRE([AC_C_INLINE])dnl
+   AC_REQUIRE([AC_TYPE_OFF_T])dnl
+   AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+   AC_REQUIRE([AC_FUNC_ALLOCA])dnl
+   AC_REQUIRE([AC_FUNC_MMAP])dnl
+   AC_REQUIRE([jm_GLIBC21])dnl
+
+   AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
+stdlib.h string.h unistd.h sys/param.h])
+   AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getcwd getegid geteuid \
+getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
+strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
+
+   AM_ICONV
+   AM_LANGINFO_CODESET
+   AM_LC_MESSAGES
+   AM_WITH_NLS([$1],[$2],[$3])
+
+   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.
+   MKINSTALLDIRS=
+   if test -n "$ac_aux_dir"; then
+     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
+   fi
+   if test -z "$MKINSTALLDIRS"; then
+     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+   fi
+   AC_SUBST(MKINSTALLDIRS)
+
+   dnl Enable libtool support if the surrounding package wishes it.
+   INTL_LIBTOOL_SUFFIX_PREFIX=ifelse([$1], use-libtool, [l], [])
+   AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
+  ])
+
+dnl Usage: Just like AM_GNU_GETTEXT, which see.
 AC_DEFUN([AM_WITH_NLS],
   [AC_MSG_CHECKING([whether NLS is requested])
     dnl Default is enabled NLS
@@ -65,12 +109,12 @@
         nls_cv_force_use_gnu_gettext=no)
       AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
 
+      gt_use_preinstalled_gnugettext=no
       nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
       if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
         dnl User does not insist on using GNU NLS library.  Figure out what
         dnl to use.  If GNU gettext is available we use this.  Else we have
         dnl to fall back to GNU NLS library.
-	CATOBJEXT=NONE
 
         dnl Add a version number to the cache macros.
         define(gt_cv_func_gnugettext_libc, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libc])
@@ -106,82 +150,84 @@
 	   if test "$gt_cv_func_gnugettext_libc" = "yes" \
 	      || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
 		   && test "$PACKAGE" != gettext; }; then
-	     AC_DEFINE(HAVE_GETTEXT, 1,
-               [Define if the GNU gettext() function is already present or preinstalled.])
-
-	     if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
-	       dnl If iconv() is in a separate libiconv library, then anyone
-	       dnl linking with libintl{.a,.so} also needs to link with
-	       dnl libiconv.
-	       INTLLIBS="-lintl $LIBICONV"
-	     fi
-
-	     gt_save_LIBS="$LIBS"
-	     LIBS="$LIBS $INTLLIBS"
-	     AC_CHECK_FUNCS(dcgettext)
-	     LIBS="$gt_save_LIBS"
-
-	     dnl Search for GNU msgfmt in the PATH.
-	     AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
-	       [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :)
-	     AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
-
-	     dnl Search for GNU xgettext in the PATH.
-	     AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
-	       [$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :)
-
-	     CATOBJEXT=.gmo
+	     gt_use_preinstalled_gnugettext=yes
 	   fi
 	])
 
-        if test "$CATOBJEXT" = "NONE"; then
+        if test "$gt_use_preinstalled_gnugettext" != "yes"; then
 	  dnl GNU gettext is not found in the C library.
-	  dnl Fall back on GNU gettext library.
+	  dnl Fall back on included GNU gettext library.
 	  nls_cv_use_gnu_gettext=yes
         fi
       fi
 
+      if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+	if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
+	  dnl If iconv() is in a separate libiconv library, then anyone
+	  dnl linking with libintl{.a,.so} also needs to link with libiconv.
+	  INTLLIBS="-lintl $LIBICONV"
+	fi
+
+	dnl For backward compatibility. Some packages may be using this.
+	AC_DEFINE(HAVE_GETTEXT, 1,
+	  [Define if the GNU gettext() function is already present or preinstalled.])
+
+	gt_save_LIBS="$LIBS"
+	LIBS="$LIBS $INTLLIBS"
+	AC_CHECK_FUNCS(dcgettext)
+	LIBS="$gt_save_LIBS"
+
+      fi
+
       if test "$nls_cv_use_gnu_gettext" = "yes"; then
         dnl Mark actions used to generate GNU NLS library.
         INTLOBJS="\$(GETTOBJS)"
-        AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
-	  [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :)
-        AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
-        AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
-	  [$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :)
-        AC_SUBST(MSGFMT)
 	BUILD_INCLUDED_LIBINTL=yes
 	USE_INCLUDED_LIBINTL=yes
-        CATOBJEXT=.gmo
 	INTLLIBS="ifelse([$3],[],\$(top_builddir)/intl,[$3])/libintl.ifelse([$1], use-libtool, [l], [])a $LIBICONV"
 	LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
       fi
 
-      dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
-      dnl Test whether we really found GNU msgfmt.
-      if test "$GMSGFMT" != ":"; then
-	dnl If it is no GNU msgfmt we define it as : so that the
-	dnl Makefiles still can work.
-	if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
-	  : ;
-	else
-	  AC_MSG_RESULT(
-	    [found msgfmt program is not GNU msgfmt; ignore it])
-	  GMSGFMT=":"
+      if test "$gt_use_preinstalled_gnugettext" = "yes" \
+	 || test "$nls_cv_use_gnu_gettext" = "yes"; then
+	dnl Mark actions to use GNU gettext tools.
+        CATOBJEXT=.gmo
+
+	dnl Search for GNU msgfmt in the PATH.
+	AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+	  [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :)
+	AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+
+	dnl Search for GNU xgettext in the PATH.
+	AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+	  [$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :)
+
+	dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
+	dnl Test whether we really found GNU msgfmt.
+	if test "$GMSGFMT" != ":"; then
+	  dnl If it is no GNU msgfmt we define it as : so that the
+	  dnl Makefiles still can work.
+	  if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
+	    : ;
+	  else
+	    AC_MSG_RESULT(
+	      [found msgfmt program is not GNU msgfmt; ignore it])
+	    GMSGFMT=":"
+	  fi
 	fi
-      fi
 
-      dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
-      dnl Test whether we really found GNU xgettext.
-      if test "$XGETTEXT" != ":"; then
-	dnl If it is no GNU xgettext we define it as : so that the
-	dnl Makefiles still can work.
-	if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
-	  : ;
-	else
-	  AC_MSG_RESULT(
-	    [found xgettext program is not GNU xgettext; ignore it])
-	  XGETTEXT=":"
+	dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
+	dnl Test whether we really found GNU xgettext.
+	if test "$XGETTEXT" != ":"; then
+	  dnl If it is no GNU xgettext we define it as : so that the
+	  dnl Makefiles still can work.
+	  if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
+	    : ;
+	  else
+	    AC_MSG_RESULT(
+	      [found xgettext program is not GNU xgettext; ignore it])
+	    XGETTEXT=":"
+	  fi
 	fi
       fi
 
@@ -212,12 +258,62 @@
             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
@@ -243,7 +339,7 @@
       dnl Found it, now check the version.
       AC_MSG_CHECKING([version of bison])
 changequote(<<,>>)dnl
-      ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+      ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison .* \([0-9]*\.[0-9.]*\).*$/\1/p'`
       case $ac_prog_version in
         '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
         1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
@@ -257,23 +353,12 @@
       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.
@@ -292,79 +377,3 @@
     GENCAT=gencat
     AC_SUBST(GENCAT)
   ])
-
-dnl Usage: Just like AM_WITH_NLS, which see.
-AC_DEFUN([AM_GNU_GETTEXT],
-  [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-   AC_REQUIRE([AC_PROG_CC])dnl
-   AC_REQUIRE([AC_CANONICAL_HOST])dnl
-   AC_REQUIRE([AC_PROG_RANLIB])dnl
-   AC_REQUIRE([AC_ISC_POSIX])dnl
-   AC_REQUIRE([AC_HEADER_STDC])dnl
-   AC_REQUIRE([AC_C_CONST])dnl
-   AC_REQUIRE([AC_C_INLINE])dnl
-   AC_REQUIRE([AC_TYPE_OFF_T])dnl
-   AC_REQUIRE([AC_TYPE_SIZE_T])dnl
-   AC_REQUIRE([AC_FUNC_ALLOCA])dnl
-   AC_REQUIRE([AC_FUNC_MMAP])dnl
-   AC_REQUIRE([jm_GLIBC21])dnl
-
-   AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
-stdlib.h string.h unistd.h sys/param.h])
-   AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getcwd getegid geteuid \
-getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
-strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
-
-   AM_ICONV
-   AM_LANGINFO_CODESET
-   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.
-   MKINSTALLDIRS=
-   if test -n "$ac_aux_dir"; then
-     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
-   fi
-   if test -z "$MKINSTALLDIRS"; then
-     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
-   fi
-   AC_SUBST(MKINSTALLDIRS)
-
-   dnl Enable libtool support if the surrounding package wishes it.
-   INTL_LIBTOOL_SUFFIX_PREFIX=ifelse([$1], use-libtool, [l], [])
-   AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
-  ])