]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Sync from gnulib.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 21 Mar 2005 07:42:07 +0000 (07:42 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 21 Mar 2005 07:42:07 +0000 (07:42 +0000)
16 files changed:
config/ChangeLog
config/config.rpath
lib/ChangeLog
lib/gettext.h
lib/regex.c
lib/setenv.c
lib/vasnprintf.c
lib/vasprintf.c
m4/ChangeLog
m4/gettext.m4
m4/inttypes.m4
m4/isc-posix.m4
m4/lib-link.m4
m4/nls.m4
m4/onceonly.m4
m4/po.m4

index 91a02f088e5c8ed2c3779337f196b94b64c36544..86c22ff0b3c14217fa21196697bc54bffafb10e0 100644 (file)
@@ -1,3 +1,7 @@
+2005-03-20  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * config.rpath: Sync from gnulib.
+
 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
 
        * config.guess, config.sub, depcomp, install-sh, mdate-sh, missing,
index 4db13e50f66ff3cb15db9f82394b13aa48a7d8e6..3f1bef34a0f0d57a0561e71fc215e64905d9950c 100755 (executable)
@@ -2,28 +2,13 @@
 # Output a system dependent set of variables, describing how to set the
 # run time search path of shared libraries in an executable.
 #
-#   Copyright 1996-2003 Free Software Foundation, Inc.
+#   Copyright 1996-2005 Free Software Foundation, Inc.
 #   Taken from GNU libtool, 2001
 #   Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
 #
-#   This program is free software; you can redistribute it and/or modify
-#   it under the terms of the GNU General Public License as published by
-#   the Free Software Foundation; either version 2 of the License, or
-#   (at your option) any later version.
-#
-#   This program is distributed in the hope that it will be useful, but
-#   WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#   General Public License for more details.
-#
-#   You should have received a copy of the GNU General Public License
-#   along with this program; if not, write to the Free Software
-#   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-#   As a special exception to the GNU General Public License, if you
-#   distribute this file as part of a program that contains a
-#   configuration script generated by Autoconf, you may include it under
-#   the same distribution terms that you use for the rest of that program.
+#   This file is free software; the Free Software Foundation gives
+#   unlimited permission to copy and/or distribute it, with or without
+#   modifications, as long as this notice is preserved.
 #
 # The first argument passed to this file is the canonical host specification,
 #    CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
@@ -50,6 +35,8 @@ host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
 host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
 host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 
+cc_basename=`echo "$CC" | sed -e 's%^.*/%%'`
+
 # Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
 
 wl=
@@ -60,6 +47,13 @@ else
     aix*)
       wl='-Wl,'
       ;;
+    darwin*)
+      case "$cc_basename" in
+        xlc*)
+          wl='-Wl,'
+          ;;
+      esac
+      ;;
     mingw* | pw32* | os2*)
       ;;
     hpux9* | hpux10* | hpux11*)
@@ -71,13 +65,19 @@ else
     newsos6)
       ;;
     linux*)
-      case $CC in
-        icc|ecc)
+      case $cc_basename in
+        icc* | ecc*)
+          wl='-Wl,'
+          ;;
+        pgcc | pgf77 | pgf90)
           wl='-Wl,'
           ;;
-        ccc)
+        ccc*)
           wl='-Wl,'
           ;;
+        como)
+          wl='-lopt='
+          ;;
       esac
       ;;
     osf3* | osf4* | osf5*)
@@ -96,6 +96,9 @@ else
       ;;
     sysv4*MP*)
       ;;
+    unicos*)
+      wl='-Wl,'
+      ;;
     uts4*)
       ;;
   esac
@@ -138,7 +141,7 @@ if test "$with_gnu_ld" = yes; then
       # that the semantics of dynamic libraries on AmigaOS, at least up
       # to version 4, is to share data among multiple programs linked
       # with the same dynamic library.  Since this doesn't match the
-      # behavior of shared libraries on other platforms, we can use
+      # behavior of shared libraries on other platforms, we cannot use
       # them.
       ld_shlibs=no
       ;;
@@ -173,6 +176,13 @@ if test "$with_gnu_ld" = yes; then
     sunos4*)
       hardcode_direct=yes
       ;;
+    linux*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
     *)
       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
         :
@@ -266,7 +276,7 @@ else
       # see comment about different semantics on the GNU ld section
       ld_shlibs=no
       ;;
-    bsdi4*)
+    bsdi[45]*)
       ;;
     cygwin* | mingw* | pw32*)
       # When not using gcc, we currently assume that we are using
@@ -277,8 +287,17 @@ else
       libext=lib
       ;;
     darwin* | rhapsody*)
-      if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
-        hardcode_direct=no
+      hardcode_direct=no
+      if test "$GCC" = yes ; then
+        :
+      else
+        case "$cc_basename" in
+          xlc*)
+            ;;
+          *)
+            ld_shlibs=no
+            ;;
+        esac
       fi
       ;;
     dgux*)
@@ -295,7 +314,7 @@ else
       hardcode_direct=yes
       hardcode_minus_L=yes
       ;;
-    freebsd*)
+    freebsd* | kfreebsd*-gnu | dragonfly*)
       hardcode_libdir_flag_spec='-R$libdir'
       hardcode_direct=yes
       ;;
@@ -438,7 +457,7 @@ case "$host_os" in
     ;;
   beos*)
     ;;
-  bsdi4*)
+  bsdi[45]*)
     ;;
   cygwin* | mingw* | pw32*)
     shrext=.dll
@@ -450,6 +469,8 @@ case "$host_os" in
     ;;
   freebsd1*)
     ;;
+  kfreebsd*-gnu)
+    ;;
   freebsd*)
     ;;
   gnu*)
@@ -486,11 +507,13 @@ case "$host_os" in
     ;;
   linux*)
     ;;
+  knetbsd*-gnu)
+    ;;
   netbsd*)
     ;;
   newsos6)
     ;;
-  nto-qnx)
+  nto-qnx*)
     ;;
   openbsd*)
     ;;
@@ -519,7 +542,7 @@ escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
 shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
 escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
 
-sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
+LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
 
 # How to pass a linker flag through the compiler.
 wl="$escaped_wl"
index 4d2260dab5ff6bbb61fdf6045a0f2ee6566d693c..cb0a2187bca33f69287aad9bf148120caf3e0267 100644 (file)
@@ -1,3 +1,9 @@
+2005-03-20  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * gettext.h, regex.c, setenv.c, vasprintf.c: Sync from gnulib.
+       * vasnprintf.c (EOVERFLOW): Define if not already defined.
+       This merges a change from gnulib.
+
 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
 
        * strftime.c (my_strftime): If the underlying strftime returns 0
index a0606dde544ce4de47ca7c688b21c15eec5e87fa..67b12f83a971f2c3bef2b86df0ff89dfa163593e 100644 (file)
@@ -1,5 +1,5 @@
 /* Convenience header for conditional use of GNU <libintl.h>.
-   Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
+   Copyright (C) 1995-1998, 2000-2002, 2004 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index d3840704a02a09d68f6f3748ac9059c5f84dac24..51106c05109b4519fb43c4aa064ab02c143d98b9 100644 (file)
@@ -4,7 +4,7 @@
    internationalization features.)
 
    Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-   2002, 2003, 2004 Free Software Foundation, Inc.
+   2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -2079,7 +2079,8 @@ static reg_errcode_t byte_compile_range (unsigned int range_start,
     bufp->allocated <<= 1;                                             \
     if (bufp->allocated > MAX_BUF_SIZE)                                        \
       bufp->allocated = MAX_BUF_SIZE;                                  \
-    bufp->buffer = REALLOC (COMPILED_BUFFER_VAR, bufp->allocated);     \
+    bufp->buffer                                                       \
+      = (UCHAR_T *) REALLOC (COMPILED_BUFFER_VAR, bufp->allocated);    \
     if (COMPILED_BUFFER_VAR == NULL)                                   \
       return REG_ESPACE;                                               \
     /* If the buffer moved, move all the pointers into it.  */         \
@@ -6010,19 +6011,22 @@ byte_re_match_2_internal (struct re_pattern_buffer *bufp,
             longest match, try backtracking.  */
          if (d != end_match_2)
            {
-             /* 1 if this match ends in the same string (string1 or string2)
-                as the best previous match.  */
-             boolean same_str_p = (FIRST_STRING_P (match_end)
-                                   == MATCHING_IN_FIRST_STRING);
              /* 1 if this match is the best seen so far.  */
              boolean best_match_p;
 
-             /* AIX compiler got confused when this was combined
-                with the previous declaration.  */
-             if (same_str_p)
-               best_match_p = d > match_end;
-             else
-               best_match_p = !MATCHING_IN_FIRST_STRING;
+             {
+               /* 1 if this match ends in the same string (string1 or string2)
+                  as the best previous match.  */
+               boolean same_str_p = (FIRST_STRING_P (match_end)
+                                     == MATCHING_IN_FIRST_STRING);
+
+               /* AIX compiler got confused when this was combined
+                  with the previous declaration.  */
+               if (same_str_p)
+                 best_match_p = d > match_end;
+               else
+                 best_match_p = !MATCHING_IN_FIRST_STRING;
+             }
 
              DEBUG_PRINT1 ("backtracking.\n");
 
@@ -6277,9 +6281,9 @@ byte_re_match_2_internal (struct re_pattern_buffer *bufp,
            uint32_t nrules;
 # endif /* _LIBC */
 #endif /* WCHAR */
-           boolean not = (re_opcode_t) *(p - 1) == charset_not;
+           boolean negate = (re_opcode_t) *(p - 1) == charset_not;
 
-            DEBUG_PRINT2 ("EXECUTING charset%s.\n", not ? "_not" : "");
+            DEBUG_PRINT2 ("EXECUTING charset%s.\n", negate ? "_not" : "");
            PREFETCH ();
            c = TRANSLATE (*d); /* The character to match.  */
 #ifdef WCHAR
@@ -6612,20 +6616,20 @@ byte_re_match_2_internal (struct re_pattern_buffer *bufp,
              if (c == *workp)
                goto char_set_matched;
 
-           not = !not;
+           negate = !negate;
 
          char_set_matched:
-           if (not) goto fail;
+           if (negate) goto fail;
 #else
             /* Cast to `unsigned' instead of `unsigned char' in case the
                bit list is a full 32 bytes long.  */
            if (c < (unsigned) (*p * BYTEWIDTH)
                && p[1 + c / BYTEWIDTH] & (1 << (c % BYTEWIDTH)))
-             not = !not;
+             negate = !negate;
 
            p += 1 + *p;
 
-           if (!not) goto fail;
+           if (!negate) goto fail;
 #undef WORK_BUFFER_SIZE
 #endif /* WCHAR */
            SET_REGS_MATCHED ();
@@ -7125,15 +7129,15 @@ byte_re_match_2_internal (struct re_pattern_buffer *bufp,
                else if ((re_opcode_t) p1[3] == charset
                         || (re_opcode_t) p1[3] == charset_not)
                  {
-                   int not = (re_opcode_t) p1[3] == charset_not;
+                   int negate = (re_opcode_t) p1[3] == charset_not;
 
                    if (c < (unsigned) (p1[4] * BYTEWIDTH)
                        && p1[5 + c / BYTEWIDTH] & (1 << (c % BYTEWIDTH)))
-                     not = !not;
+                     negate = !negate;
 
-                    /* `not' is equal to 1 if c would match, which means
+                    /* `negate' is equal to 1 if c would match, which means
                         that we can't change to pop_failure_jump.  */
-                   if (!not)
+                   if (!negate)
                       {
                        p[-3] = (unsigned char) pop_failure_jump;
                         DEBUG_PRINT1 ("  No match => pop_failure_jump.\n");
@@ -8014,14 +8018,15 @@ regcomp (regex_t *preg, const char *pattern, int cflags)
   preg->used = 0;
 
   /* Try to allocate space for the fastmap.  */
-  preg->fastmap = malloc (1 << BYTEWIDTH);
+  preg->fastmap = (char *) malloc (1 << BYTEWIDTH);
 
   if (cflags & REG_ICASE)
     {
       unsigned i;
 
-      preg->translate = malloc (CHAR_SET_SIZE
-                               * sizeof (*(RE_TRANSLATE_TYPE)0));
+      preg->translate =
+       (RE_TRANSLATE_TYPE)
+       malloc (CHAR_SET_SIZE * sizeof (*(RE_TRANSLATE_TYPE)0));
       if (preg->translate == NULL)
         return (int) REG_ESPACE;
 
index 320469b86309b0b9221e0ba80d5fb749a3441c9c..ae4174af2669509e27ab9408cb1bb3479f88e3cf 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992,1995-1999,2000-2004 Free Software Foundation, Inc.
+/* Copyright (C) 1992,1995-1999,2000-2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    This program is free software; you can redistribute it and/or modify
index a21134016f03e8b6dad2a6f64ae8894152d81a51..df939984aea6c79ef85662aa2e776a5dc2e20f40 100644 (file)
 # define SIZE_MAX ((size_t) -1)
 #endif
 
+/* Some systems, like OSF/1 4.0 and Woe32, don't have EOVERFLOW.  */
+#ifndef EOVERFLOW
+# define EOVERFLOW E2BIG
+#endif
+
 #ifdef HAVE_WCHAR_T
 # ifdef HAVE_WCSLEN
 #  define local_wcslen wcslen
index ba94c64ba8bc9f96a1a67f62dd9ceb8852a5d810..600e8aa3ffc17c1b857aff74090d658d60bb2d7f 100644 (file)
@@ -1,5 +1,5 @@
 /* Formatted output to strings.
-   Copyright (C) 1999, 2002-2004 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 3aa0d0732c230c12f15c3bfc993b1e36e7b8685b..a6748603019af47872f0b03dff1a645783d6ec42 100644 (file)
@@ -1,3 +1,8 @@
+2005-03-20  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * gettext.m4, inttypes.m4, isc-posix.m4, lib-link.m4, nls.m4,
+       onceonly.m4, po.m4: Sync from gnulib.
+
 2005-03-17  Jim Meyering  <jim@meyering.net>
 
        * typeof.m4 (gl_TYPEOF): New file/macro.
index 368907a299373aee1727950fd7f8cebf6d67a5a4..6261026130ef33c962c63b099710ed8458f33286 100644 (file)
@@ -1,4 +1,4 @@
-# gettext.m4 serial 34 (gettext-0.14.2)
+# gettext.m4 serial 36 (gettext-0.14.3)
 dnl Copyright (C) 1995-2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -63,8 +63,8 @@ AC_DEFUN([AM_GNU_GETTEXT],
   ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
     [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
 ])])])])
-  define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
-  define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
+  define([gt_included_intl], ifelse([$1], [external], [no], [yes]))
+  define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
 
   AC_REQUIRE([AM_PO_SUBDIRS])dnl
   ifelse(gt_included_intl, yes, [
@@ -239,6 +239,7 @@ return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("",
         LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
       fi
 
+      CATOBJEXT=
       if test "$gt_use_preinstalled_gnugettext" = "yes" \
          || test "$nls_cv_use_gnu_gettext" = "yes"; then
         dnl Mark actions to use GNU gettext tools.
@@ -330,6 +331,7 @@ return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("",
     AC_SUBST(GENCAT)
 
     dnl For backward compatibility. Some Makefiles may be using this.
+    INTLOBJS=
     if test "$USE_INCLUDED_LIBINTL" = yes; then
       INTLOBJS="\$(GETTOBJS)"
     fi
index ab370ffe00569af2301295ce61cac7b642ed8e35..779bcea059d29123ca9d541e4dd7749ba2497980 100644 (file)
@@ -1,10 +1,8 @@
 # inttypes.m4 serial 1 (gettext-0.11.4)
 dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
-dnl This file is free software, distributed under the terms of the GNU
-dnl General Public License.  As a special exception to the GNU General
-dnl Public License, this file may be distributed as part of a program
-dnl that contains a configuration script generated by Autoconf, under
-dnl the same distribution terms as the rest of that program.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
 
 dnl From Paul Eggert.
 
index 1319dd1c70a8f59537309b119f1455b4fa6d0aa0..74dc8f26d880c55bc52d4e5fd158ae1fc1cde7ce 100644 (file)
@@ -1,10 +1,8 @@
 # isc-posix.m4 serial 2 (gettext-0.11.2)
 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
-dnl This file is free software, distributed under the terms of the GNU
-dnl General Public License.  As a special exception to the GNU General
-dnl Public License, this file may be distributed as part of a program
-dnl that contains a configuration script generated by Autoconf, under
-dnl the same distribution terms as the rest of that program.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
 
 # This file is not needed with autoconf-2.53 and newer.  Remove it in 2005.
 
index a4586c7a82a141d37c4aca45d3cc04b1f6d9fc48..ea0b0c4ea6b85bbb799fb1cf6fb8844eb33de436 100644 (file)
@@ -1,4 +1,4 @@
-# lib-link.m4 serial 5 (gettext-0.14.2)
+# lib-link.m4 serial 6 (gettext-0.14.3)
 dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -6,6 +6,8 @@ dnl with or without modifications, as long as this notice is preserved.
 
 dnl From Bruno Haible.
 
+AC_PREREQ(2.50)
+
 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
 dnl the libraries corresponding to explicit and implicit dependencies.
 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
@@ -93,6 +95,8 @@ dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
 dnl hardcode_direct, hardcode_minus_L.
 AC_DEFUN([AC_LIB_RPATH],
 [
+  dnl Tell automake >= 1.10 to complain if config.rpath is missing.
+  m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
   AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
   AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
   AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
index 596c89f50d1030e66449ebb73cfa9ebfb2588c35..2082c3b249d6cefa1c9506fae61926caded265f4 100644 (file)
--- a/m4/nls.m4
+++ b/m4/nls.m4
@@ -1,5 +1,5 @@
-# nls.m4 serial 1 (gettext-0.12)
-dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
+# nls.m4 serial 2 (gettext-0.14.3)
+dnl Copyright (C) 1995-2003, 2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -17,6 +17,8 @@ dnl Authors:
 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
 
+AC_PREREQ(2.50)
+
 AC_DEFUN([AM_NLS],
 [
   AC_MSG_CHECKING([whether NLS is requested])
@@ -30,6 +32,8 @@ AC_DEFUN([AM_NLS],
 
 AC_DEFUN([AM_MKINSTALLDIRS],
 [
+  dnl Tell automake >= 1.10 to complain if mkinstalldirs is missing.
+  m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([mkinstalldirs])])
   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 it.
index 50b33f489fe9f86762b06d7e4af2ed6993c4d4d7..a8a992af4b84f058ac442a8dfa80ef8250a132b0 100644 (file)
@@ -1,10 +1,8 @@
 # onceonly.m4 serial 3 (gettext-0.12)
 dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
-dnl This file is free software, distributed under the terms of the GNU
-dnl General Public License.  As a special exception to the GNU General
-dnl Public License, this file may be distributed as part of a program
-dnl that contains a configuration script generated by Autoconf, under
-dnl the same distribution terms as the rest of that program.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
 
 dnl This file defines some "once only" variants of standard autoconf macros.
 dnl   AC_CHECK_HEADERS_ONCE         like  AC_CHECK_HEADERS
index ab43f0ecb67e17e38d722b3ba9a117bb08ffa07c..f2795eea0ca42665ceedb08f4dd90f79c25bfe1f 100644 (file)
--- a/m4/po.m4
+++ b/m4/po.m4
@@ -1,4 +1,4 @@
-# po.m4 serial 5 (gettext-0.14.2)
+# po.m4 serial 7 (gettext-0.14.3)
 dnl Copyright (C) 1995-2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -106,6 +106,9 @@ AC_DEFUN([AM_PO_SUBDIRS],
           /*) top_srcdir="$ac_given_srcdir" ;;
           *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
         esac
+        # Treat a directory as a PO directory if and only if it has a
+        # POTFILES.in file. This allows packages to have multiple PO
+        # directories under different names or in different locations.
         if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
           rm -f "$ac_dir/POTFILES"
           test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
@@ -119,7 +122,7 @@ AC_DEFUN([AM_PO_SUBDIRS],
             if test -n "$OBSOLETE_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"`
+            ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
             # Hide the ALL_LINGUAS assigment from automake.
             eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
             POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
@@ -298,7 +301,7 @@ changequote([,])dnl
   fi
   if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
     # The LINGUAS file contains the set of available languages.
-    ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+    ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
     POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
   else
     # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.