From 8d553e22b1d1a8079d1aab1502a06d91e897a4bc Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 4 Apr 2004 06:53:20 +0000 Subject: Sync from gnulib. --- m4/c-stack.m4 | 8 +++++--- m4/getline.m4 | 11 +++++++++-- m4/getndelim2.m4 | 10 ++++++++-- m4/mbswidth.m4 | 21 ++++++++++++++++++++- m4/po.m4 | 23 +++++++++++++++++++++-- m4/strdup.m4 | 9 ++++----- m4/xsize.m4 | 5 +++-- 7 files changed, 70 insertions(+), 17 deletions(-) (limited to 'm4') 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 ]) + AC_CHECK_TYPES([stack_t], , , [#include ])]) 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 has a declaration of a function mbswidth() + dnl that clashes with ours. + AC_CACHE_CHECK([whether mbswidth is declared in ], + ac_cv_have_decl_mbswidth, + [AC_TRY_COMPILE([ +#if HAVE_WCHAR_H +# include +#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 , 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 @@ -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" <