summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2004-04-04 06:53:20 +0000
committerJim Meyering <jim@meyering.net>2004-04-04 06:53:20 +0000
commit8d553e22b1d1a8079d1aab1502a06d91e897a4bc (patch)
tree58d25468f87680f47477117dc4ca3c373e3cacf5 /m4
parent8c5584a1513cdbf62e8ed51c69053db4aae44682 (diff)
downloadcoreutils-8d553e22b1d1a8079d1aab1502a06d91e897a4bc.tar.xz
Sync from gnulib.
Diffstat (limited to 'm4')
-rw-r--r--m4/c-stack.m48
-rw-r--r--m4/getline.m411
-rw-r--r--m4/getndelim2.m410
-rw-r--r--m4/mbswidth.m421
-rw-r--r--m4/po.m423
-rw-r--r--m4/strdup.m49
-rw-r--r--m4/xsize.m45
7 files changed, 70 insertions, 17 deletions
diff --git a/m4/c-stack.m4 b/m4/c-stack.m4
index 8049d96bd..9511e8f96 100644
--- a/m4/c-stack.m4
+++ b/m4/c-stack.m4
@@ -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
])
diff --git a/m4/getline.m4 b/m4/getline.m4
index 606a989b9..56960c937 100644
--- a/m4/getline.m4
+++ b/m4/getline.m4
@@ -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
diff --git a/m4/getndelim2.m4 b/m4/getndelim2.m4
index ce89321de..cd4ef4b67 100644
--- a/m4/getndelim2.m4
+++ b/m4/getndelim2.m4
@@ -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
])
diff --git a/m4/mbswidth.m4 b/m4/mbswidth.m4
index d7981ca39..7eefd879d 100644
--- a/m4/mbswidth.m4
+++ b/m4/mbswidth.m4
@@ -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
])
diff --git a/m4/po.m4 b/m4/po.m4
index b8190a505..e16199881 100644
--- 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
@@ -398,6 +406,17 @@ $frobbedlang.msg: $lang.po
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
if test -n "$POMAKEFILEDEPS"; then
cat >> "$ac_file.tmp" <<EOF
Makefile: $POMAKEFILEDEPS
diff --git a/m4/strdup.m4 b/m4/strdup.m4
index effeb60ea..6e64bc80f 100644
--- a/m4/strdup.m4
+++ b/m4/strdup.m4
@@ -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)
])
-
diff --git a/m4/xsize.m4 b/m4/xsize.m4
index 9b7cf9b49..7bf1865b4 100644
--- a/m4/xsize.m4
+++ b/m4/xsize.m4
@@ -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)
])