]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Sync from gnulib.
authorJim Meyering <jim@meyering.net>
Sun, 4 Apr 2004 06:53:20 +0000 (06:53 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 4 Apr 2004 06:53:20 +0000 (06:53 +0000)
m4/c-stack.m4
m4/getline.m4
m4/getndelim2.m4
m4/mbswidth.m4
m4/po.m4
m4/strdup.m4
m4/xsize.m4

index 8049d96bdfdcf8ab6d9efd53c16aa2501ab4c2b4..9511e8f965708608bbdb05e94c65fabc1955afa3 100644 (file)
@@ -1,6 +1,6 @@
 # Check prerequisites for compiling lib/c-stack.c.
 
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 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
@@ -138,7 +138,7 @@ AC_DEFUN([AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC],
    fi])
 
 
-AC_DEFUN([jm_PREREQ_C_STACK],
+AC_DEFUN([gl_PREREQ_C_STACK],
   [AC_REQUIRE([AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC])
 
    # for STACK_DIRECTION
@@ -151,10 +151,12 @@ AC_DEFUN([jm_PREREQ_C_STACK],
    AC_CHECK_HEADERS_ONCE(sys/time.h unistd.h)
    AC_CHECK_HEADERS(sys/resource.h ucontext.h)
 
+   AC_CHECK_MEMBERS([struct sigaction.sa_sigaction], , , [#include <signal.h>])
+
    AC_CHECK_TYPES([stack_t], , , [#include <signal.h>])])
 
 AC_DEFUN([gl_C_STACK],
 [
   dnl Prerequisites of lib/c-stack.c.
-  jm_PREREQ_C_STACK
+  gl_PREREQ_C_STACK
 ])
index 606a989b950872a2623509fed9eaec0669b8e282..56960c9371c2c774436b055be9cf670f9e283e4c 100644 (file)
@@ -1,4 +1,4 @@
-# getline.m4 serial 9
+# getline.m4 serial 10
 
 dnl Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software
 dnl Foundation, Inc.
@@ -56,7 +56,14 @@ AC_DEFUN([AM_FUNC_GETLINE],
     AC_DEFINE([getline], [gnu_getline],
       [Define to a replacement function name for getline().])
     AC_LIBOBJ(getline)
-    AC_LIBOBJ(getndelim2)
+
+    # Avoid multiple inclusions of getndelim2.o into LIBOBJS.
+    # This hack won't be needed after gnulib requires Autoconf 2.58 or later.
+    case " $LIB@&t@OBJS " in
+    *" getndelim2.$ac_objext "* ) ;;
+    *) AC_LIBOBJ(getndelim2);;
+    esac
+
     gl_PREREQ_GETLINE
     gl_PREREQ_GETNDELIM2
   fi
index ce89321de14507460e40d3789836cd02aa0aa4c0..cd4ef4b671a716676af8558767682cfee7ee2350 100644 (file)
@@ -1,4 +1,4 @@
-# getndelim2.m4 serial 2
+# getndelim2.m4 serial 3
 dnl Copyright (C) 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
@@ -8,7 +8,13 @@ dnl the same distribution terms as the rest of that program.
 
 AC_DEFUN([gl_GETNDELIM2],
 [
-  AC_LIBOBJ(getndelim2)
+  # Avoid multiple inclusions of getndelim2.o into LIBOBJS.
+  # This hack won't be needed after gnulib requires Autoconf 2.58 or later.
+  case " $LIB@&t@OBJS " in
+  *" getndelim2.$ac_objext "* ) ;;
+  *) AC_LIBOBJ(getndelim2);;
+  esac
+
   gl_PREREQ_GETNDELIM2
 ])
 
index d7981ca39b74db3fd7b286dd2af5dd7586a20aba..7eefd879d26a46e04279dd0972a38ebd905fdc6b 100644 (file)
@@ -1,4 +1,4 @@
-#serial 9
+#serial 10
 
 dnl autoconf tests required for use of mbswidth.c
 dnl From Bruno Haible.
@@ -32,5 +32,24 @@ AC_DEFUN([gl_MBSWIDTH],
   AC_DEFINE_UNQUOTED(HAVE_DECL_WCWIDTH, $ac_val,
     [Define to 1 if you have the declaration of wcwidth(), and to 0 otherwise.])
 
+  dnl UnixWare 7.1.1 <wchar.h> has a declaration of a function mbswidth()
+  dnl that clashes with ours.
+  AC_CACHE_CHECK([whether mbswidth is declared in <wchar.h>],
+    ac_cv_have_decl_mbswidth,
+    [AC_TRY_COMPILE([
+#if HAVE_WCHAR_H
+# include <wchar.h>
+#endif
+], [
+  char *p = (char *) mbswidth;
+], ac_cv_have_decl_mbswidth=yes, ac_cv_have_decl_mbswidth=no)])
+  if test $ac_cv_have_decl_mbswidth = yes; then
+    ac_val=1
+  else
+    ac_val=0
+  fi
+  AC_DEFINE_UNQUOTED(HAVE_DECL_MBSWIDTH_IN_WCHAR_H, $ac_val,
+    [Define to 1 if you have a declaration of mbswidth() in <wchar.h>, and to 0 otherwise.])
+
   AC_TYPE_MBSTATE_T
 ])
index b8190a5052eac2964fe4dc72875e5c765fb8691a..e1619988187071bc80ab6a93cd1f67d361480176 100644 (file)
--- a/m4/po.m4
+++ b/m4/po.m4
@@ -1,4 +1,4 @@
-# po.m4 serial 2 (gettext-0.13)
+# po.m4 serial 3 (gettext-0.14)
 dnl Copyright (C) 1995-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
@@ -323,6 +323,8 @@ changequote([,])dnl
   # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
   # Compute MSGFILES
   # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
+  # Compute RESOURCESDLLFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
   case "$ac_given_srcdir" in
     .) srcdirpre= ;;
     *) srcdirpre='$(srcdir)/' ;;
@@ -335,6 +337,7 @@ changequote([,])dnl
   CLASSFILES=
   QMFILES=
   MSGFILES=
+  RESOURCESDLLFILES=
   for lang in $ALL_LINGUAS; do
     POFILES="$POFILES $srcdirpre$lang.po"
     UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
@@ -345,6 +348,8 @@ changequote([,])dnl
     QMFILES="$QMFILES $srcdirpre$lang.qm"
     frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
     MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
+    frobbedlang=`echo $lang | sed -e 's/_/-/g'`
+    RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
   done
   # CATALOGS depends on both $ac_dir and the user's LINGUAS
   # environment variable.
@@ -376,6 +381,7 @@ changequote([,])dnl
   JAVACATALOGS=
   QTCATALOGS=
   TCLCATALOGS=
+  CSHARPCATALOGS=
   if test -n "$INST_LINGUAS"; then
     for lang in $INST_LINGUAS; do
       CATALOGS="$CATALOGS $lang.gmo"
@@ -383,10 +389,12 @@ changequote([,])dnl
       QTCATALOGS="$QTCATALOGS $lang.qm"
       frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
       TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
+      frobbedlang=`echo $lang | sed -e 's/_/-/g'`
+      CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
     done
   fi
 
-  sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
+  sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
   if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
     # Add dependencies that cannot be formulated as a simple suffix rule.
     for lang in $ALL_LINGUAS; do
@@ -395,6 +403,17 @@ changequote([,])dnl
 $frobbedlang.msg: $lang.po
        @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
        \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+    done
+  fi
+  if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
+    # Add dependencies that cannot be formulated as a simple suffix rule.
+    for lang in $ALL_LINGUAS; do
+      frobbedlang=`echo $lang | sed -e 's/_/-/g'`
+      cat >> "$ac_file.tmp" <<EOF
+$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
+       @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
+       \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
 EOF
     done
   fi
index effeb60eacb254c76f0f8a6ce87b55750ff32d22..6e64bc80fc3d1d6c7045b44c3f0ee2a454408e13 100644 (file)
@@ -1,5 +1,5 @@
-# strdup.m4 serial 2
-dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# strdup.m4 serial 3
+dnl Copyright (C) 2002, 2003, 2004 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
@@ -14,8 +14,7 @@ AC_DEFUN([gl_FUNC_STRDUP],
   fi
 ])
 
-# Prerequisites of lib/strdup.c.
+# Prerequisites of lib/strdup.h and lib/strdup.c.
 AC_DEFUN([gl_PREREQ_STRDUP], [
-  :
+  AC_CHECK_DECLS(strdup)
 ])
-
index 9b7cf9b49305037c04d5c86e9525c7eb68bf3598..7bf1865b456b3eadc31fcabfad29affe7ca7f2a1 100644 (file)
@@ -1,5 +1,5 @@
-# xsize.m4 serial 2
-dnl Copyright (C) 2003 Free Software Foundation, Inc.
+# xsize.m4 serial 3
+dnl Copyright (C) 2003-2004 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
@@ -10,5 +10,6 @@ AC_DEFUN([gl_XSIZE],
 [
   dnl Prerequisites of lib/xsize.h.
   AC_REQUIRE([gl_SIZE_MAX])
+  AC_REQUIRE([AC_C_INLINE])
   AC_CHECK_HEADERS(stdint.h)
 ])