From: Bruno Haible Date: Sat, 15 Aug 2009 15:19:17 +0000 (+0200) Subject: Invoke gnulib-tool also for gettext-runtime/libasprintf. X-Git-Tag: v0.18~130 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a8ac5addde4ece761244fd2c70638dca6dea6eed;p=thirdparty%2Fgettext.git Invoke gnulib-tool also for gettext-runtime/libasprintf. --- diff --git a/ChangeLog b/ChangeLog index 107928089..72c03a663 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2009-08-14 Bruno Haible + + * autogen.sh: Invoke gnulib-tool also for gettext-runtime/libasprintf. + (GNULIB_MODULES_LIBASPRINTF, GNULIB_MODULES_LIBASPRINTF_OTHER): New + variables. + Update aclocal options for gettext-runtime/libasprintf. + * Makefile.am (distcheck-hook): Don't compare eoverflow.m4. Update + comparison of alloca.in.h. + 2009-08-14 Bruno Haible Remove automatically copied files from version control. diff --git a/Makefile.am b/Makefile.am index d714a051a..9ca7eca46 100644 --- a/Makefile.am +++ b/Makefile.am @@ -43,7 +43,6 @@ distcheck-hook: cmp -s gettext-runtime/po/remove-potcdate.sin gettext-tools/po/remove-potcdate.sin cmp -s gettext-runtime/po/remove-potcdate.sin gettext-tools/examples/po/remove-potcdate.sin cmp -s gettext-runtime/m4/codeset.m4 gettext-tools/gnulib-m4/codeset.m4 - cmp -s gettext-runtime/m4/eoverflow.m4 gettext-tools/gnulib-m4/eoverflow.m4 cmp -s gettext-runtime/m4/gettext.m4 gettext-tools/gnulib-m4/gettext.m4 cmp -s gettext-runtime/m4/glibc2.m4 gettext-tools/gnulib-m4/glibc2.m4 cmp -s gettext-runtime/m4/glibc21.m4 gettext-tools/gnulib-m4/glibc21.m4 @@ -98,7 +97,7 @@ distcheck-hook: cmp -s gettext-runtime/libasprintf/texi2html gettext-tools/doc/texi2html cmp -s gettext-tools/examples/hello-java-awt/m4/TestAWT.java gettext-tools/examples/hello-java-swing/m4/TestAWT.java cmp -s gettext-tools/examples/hello-java-awt/m4/TestAWT.class gettext-tools/examples/hello-java-swing/m4/TestAWT.class - test "`sed 1,15d gnulib-local/lib/alloca.in.h | md5sum`" = "`sed 1,17d gettext-runtime/libasprintf/alloca.in.h | md5sum`" + test "`sed 1,15d gnulib-local/lib/alloca.in.h | md5sum`" = "`sed 1,15d gettext-runtime/libasprintf/alloca.in.h | md5sum`" cmp -s gettext-tools/libgrep/memchr.c gettext-tools/gnulib-lib/memchr.c cmp -s gettext-tools/libgrep/strdup.c gettext-tools/gnulib-lib/strdup.c diff --git a/autogen.sh b/autogen.sh index b88296ec4..2f0045899 100755 --- a/autogen.sh +++ b/autogen.sh @@ -103,6 +103,18 @@ if ! $skip_gnulib; then ' $GNULIB_TOOL --dir=gettext-runtime --lib=libgrt --source-base=gnulib-lib --m4-base=gnulib-m4 --no-libtool --local-dir=gnulib-local --local-symlink \ --import $GNULIB_MODULES_RUNTIME_FOR_SRC $GNULIB_MODULES_RUNTIME_OTHER + # In gettext-runtime/libasprintf: + if test -f gettext-runtime/libasprintf/gnulib-m4/gnulib-cache.m4; then + mv -f gettext-runtime/libasprintf/gnulib-m4/gnulib-cache.m4 gettext-runtime/libasprintf/gnulib-m4/gnulib-cache.m4~ + fi + GNULIB_MODULES_LIBASPRINTF=' + alloca + errno + ' + GNULIB_MODULES_LIBASPRINTF_OTHER=' + ' + $GNULIB_TOOL --dir=gettext-runtime/libasprintf --source-base=. --m4-base=gnulib-m4 --lgpl=2 --makefile-name=Makefile.gnulib --libtool --local-dir=gnulib-local --local-symlink \ + --import $GNULIB_MODULES_LIBASPRINTF $GNULIB_MODULES_LIBASPRINTF_OTHER # In gettext-tools: if test -f gettext-tools/gnulib-m4/gnulib-cache.m4; then mv -f gettext-tools/gnulib-m4/gnulib-cache.m4 gettext-tools/gnulib-m4/gnulib-cache.m4~ @@ -314,7 +326,7 @@ fi ) (cd gettext-runtime/libasprintf - ../../build-aux/fixaclocal aclocal -I ../../m4 -I ../m4 + ../../build-aux/fixaclocal aclocal -I ../../m4 -I ../m4 -I gnulib-m4 autoconf autoheader && touch config.h.in automake --add-missing --copy diff --git a/gettext-runtime/libasprintf/.gitignore b/gettext-runtime/libasprintf/.gitignore index f03196417..c1ca536de 100644 --- a/gettext-runtime/libasprintf/.gitignore +++ b/gettext-runtime/libasprintf/.gitignore @@ -1,3 +1,13 @@ +# Directories brought in by gnulib-tool: +/gnulib-m4 + +# Files brought in by gnulib-tool: +/Makefile.gnulib +/alloca.c +/alloca.in.h +/dummy.c +/errno.in.h + # Files generated by the autotools: /Makefile.in /aclocal.m4 diff --git a/gettext-runtime/libasprintf/ChangeLog b/gettext-runtime/libasprintf/ChangeLog index dacf53682..33960518a 100644 --- a/gettext-runtime/libasprintf/ChangeLog +++ b/gettext-runtime/libasprintf/ChangeLog @@ -1,3 +1,14 @@ +2009-08-14 Bruno Haible + + Use the gnulib module 'errno'. + * Makefile.am: Include Makefile.gnulib. + (ACLOCAL_AMFLAGS): Add -I gnulib-m4. + (EXTRA_DIST): Add gnulib-m4/gnulib-cache.m4. + (BUILT_SOURCES, noinst_LTLIBRARIES): New variables. + * configure.ac (AC_PREREQ): Require autoconf 2.59 or newer. + Invoke gl_EARLY, gl_INIT. Don't invoke gl_EOVERFLOW. Remove the alloca + tests. + 2009-08-10 Bruno Haible * vasnprintf.c (DCHAR_SET): Undefine at the end. diff --git a/gettext-runtime/libasprintf/Makefile.am b/gettext-runtime/libasprintf/Makefile.am index e52208e20..54bbf3ef3 100644 --- a/gettext-runtime/libasprintf/Makefile.am +++ b/gettext-runtime/libasprintf/Makefile.am @@ -20,8 +20,9 @@ AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies ACLOCAL = ../../build-aux/fixaclocal @ACLOCAL@ -ACLOCAL_AMFLAGS = -I ../../m4 -I ../m4 +ACLOCAL_AMFLAGS = -I ../../m4 -I ../m4 -I gnulib-m4 EXTRA_DIST = +BUILT_SOURCES = MOSTLYCLEANFILES = RM = rm -f @@ -47,6 +48,8 @@ dist-hook: lib_LTLIBRARIES = libasprintf.la +noinst_LTLIBRARIES = + libasprintf_la_SOURCES = \ lib-asprintf.h lib-asprintf.c \ autosprintf.h autosprintf.cc @@ -71,16 +74,11 @@ libasprintf.la: $(libasprintf_la_OBJECTS) $(libasprintf_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libasprintf_la_LDFLAGS) $(libasprintf_la_OBJECTS) $(libasprintf_la_LIBADD) $(LIBS) -# >>> gnulib module alloca. -EXTRA_DIST += alloca.in.h +# A small set of gnulib modules is needed here as well. +include Makefile.gnulib -# The following is needed in order to create an when the system -# doesn't have one that works with the given compiler. -all-local $(libasprintf_la_OBJECTS): @ALLOCA_H@ -alloca.h: alloca.in.h - cp $(srcdir)/alloca.in.h alloca.h -MOSTLYCLEANFILES += alloca.h -# <<< gnulib module alloca. +# Allow users to use "gnulib-tool --update". +EXTRA_DIST += gnulib-m4/gnulib-cache.m4 # Clean up after Solaris cc. diff --git a/gettext-runtime/libasprintf/alloca.in.h b/gettext-runtime/libasprintf/alloca.in.h deleted file mode 100644 index a953bd4e7..000000000 --- a/gettext-runtime/libasprintf/alloca.in.h +++ /dev/null @@ -1,70 +0,0 @@ -/* Memory allocation on the stack. - Copyright (C) 1995, 1999, 2001-2007 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published - by the Free Software Foundation; either version 2, 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - USA. */ - -/* When this file is included, it may be preceded only by preprocessor - declarations. Thanks to AIX. Therefore we include it right after - "config.h", not later. */ - -/* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H - means there is a real alloca function. */ -#ifndef _GL_ALLOCA_H -#define _GL_ALLOCA_H - -/* alloca(N) returns a pointer (void* or char*) to N bytes of memory - allocated on the stack, and which will last until the function returns. - Use of alloca should be avoided: - - inside arguments of function calls - undefined behaviour, - - in inline functions - the allocation may actually last until the - calling function returns, - - for huge N (say, N >= 65536) - you never know how large (or small) - the stack is, and when the stack cannot fulfill the memory allocation - request, the program just crashes. - */ - -#ifndef alloca -# ifdef __GNUC__ -# define alloca __builtin_alloca -# else -# ifdef _MSC_VER -# include -# define alloca _alloca -# else -# if HAVE_ALLOCA_H -# include -# else -# ifdef _AIX - #pragma alloca -# else -# ifdef __hpux /* This section must match that of bison generated files. */ -# ifdef __cplusplus -extern "C" void *alloca (unsigned int); -# else /* not __cplusplus */ -extern void *alloca (); -# endif /* not __cplusplus */ -# else /* not __hpux */ -# ifndef alloca -extern char *alloca (); -# endif -# endif /* __hpux */ -# endif -# endif -# endif -# endif -#endif - -#endif /* _GL_ALLOCA_H */ diff --git a/gettext-runtime/libasprintf/configure.ac b/gettext-runtime/libasprintf/configure.ac index 5b247afd1..162e73ba7 100644 --- a/gettext-runtime/libasprintf/configure.ac +++ b/gettext-runtime/libasprintf/configure.ac @@ -16,7 +16,7 @@ dnl along with this program. If not, see . dnl Process this file with autoconf to produce a configure script. -AC_PREREQ([2.52]) +AC_PREREQ([2.59]) AC_INIT([libasprintf], [1.0]) AC_CONFIG_SRCDIR([vasprintf.c]) AC_CONFIG_AUX_DIR([../../build-aux]) @@ -35,6 +35,9 @@ dnl Checks for compiler output filename suffixes. AC_OBJEXT AC_EXEEXT +dnl Early checks, assembled by gnulib. +gl_EARLY + dnl Check for build configuration. gl_WOE32_DLL LT_INIT([win32-dll]) @@ -65,23 +68,12 @@ gl_XSIZE dnl Checks for library functions. -AC_FUNC_ALLOCA -dnl Define an additional variable used in the Makefile substitution. -AC_EGREP_CPP([Need own alloca], [ -#if defined __GNUC__ || defined _MSC_VER || !HAVE_ALLOCA_H - Need own alloca -#endif - ], - [ALLOCA_H=alloca.h], - [ALLOCA_H=]) -AC_SUBST([ALLOCA_H]) - +gl_INIT AC_CHECK_FUNCS([snprintf vasprintf strnlen wcslen wcsnlen mbrtowc wcrtomb]) dnl Use the _snprintf function only if it is declared (because on NetBSD it dnl is defined as a weak alias of snprintf; we prefer to use the latter). AC_CHECK_DECLS([_snprintf], , , [#include ]) gt_PRINTF_POSIX -gl_EOVERFLOW dnl Check for tools needed for formatting the documentation. ac_aux_dir_abs=`cd $ac_aux_dir && pwd` diff --git a/gettext-runtime/m4/ChangeLog b/gettext-runtime/m4/ChangeLog index 06fcea8d2..8d699b941 100644 --- a/gettext-runtime/m4/ChangeLog +++ b/gettext-runtime/m4/ChangeLog @@ -1,3 +1,8 @@ +2009-08-14 Bruno Haible + + * eoverflow.m4: Remove file. Obsoleted by gnulib's 'errno' module. + * Makefile.am (EXTRA_DIST): Remove it. + 2009-08-14 Bruno Haible Disable multithread support by default on Cygwin 1.5.x for real. diff --git a/gettext-runtime/m4/Makefile.am b/gettext-runtime/m4/Makefile.am index 9bcb87b86..5dcfc6827 100644 --- a/gettext-runtime/m4/Makefile.am +++ b/gettext-runtime/m4/Makefile.am @@ -5,7 +5,6 @@ EXTRA_DIST = README \ ansi-c++.m4 \ codeset.m4 \ -eoverflow.m4 \ gettext.m4 \ glibc2.m4 \ glibc21.m4 \ diff --git a/gettext-runtime/m4/eoverflow.m4 b/gettext-runtime/m4/eoverflow.m4 deleted file mode 100644 index 3bffd10ed..000000000 --- a/gettext-runtime/m4/eoverflow.m4 +++ /dev/null @@ -1,70 +0,0 @@ -# eoverflow.m4 serial 2 -dnl Copyright (C) 2004, 2006 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. - -dnl From Bruno Haible. - -# The EOVERFLOW errno value ought to be defined in , according to -# POSIX. But some systems (like AIX 3) don't define it, and some systems -# (like OSF/1) define it when _XOPEN_SOURCE_EXTENDED is defined. - -# Define EOVERFLOW as a C macro and as a substituted macro in such a way that -# 1. on all systems, after inclusion of , EOVERFLOW is usable, -# 2. on systems where EOVERFLOW is defined elsewhere, we use the same numeric -# value. - -AC_DEFUN([gl_EOVERFLOW], -[ - AC_REQUIRE([AC_PROG_CC])dnl - - AC_CACHE_CHECK([for EOVERFLOW], ac_cv_decl_EOVERFLOW, [ - AC_EGREP_CPP(yes,[ -#include -#ifdef EOVERFLOW -yes -#endif - ], have_eoverflow=1) - if test -n "$have_eoverflow"; then - dnl EOVERFLOW exists in . Don't need to define EOVERFLOW ourselves. - ac_cv_decl_EOVERFLOW=yes - else - AC_EGREP_CPP(yes,[ -#define _XOPEN_SOURCE_EXTENDED 1 -#include -#ifdef EOVERFLOW -yes -#endif - ], have_eoverflow=1) - if test -n "$have_eoverflow"; then - dnl EOVERFLOW exists but is hidden. - dnl Define it to the same value. - AC_COMPUTE_INT([ac_cv_decl_EOVERFLOW], [EOVERFLOW], [ -#define _XOPEN_SOURCE_EXTENDED 1 -#include -/* The following two lines are a workaround against an autoconf-2.52 bug. */ -#include -#include -]) - else - dnl EOVERFLOW isn't defined by the system. Define EOVERFLOW ourselves, but - dnl don't define it as EINVAL, because snprintf() callers want to - dnl distinguish EINVAL and EOVERFLOW. - ac_cv_decl_EOVERFLOW=E2BIG - fi - fi - ]) - if test "$ac_cv_decl_EOVERFLOW" != yes; then - AC_DEFINE_UNQUOTED([EOVERFLOW], [$ac_cv_decl_EOVERFLOW], - [Define as good substitute value for EOVERFLOW.]) - EOVERFLOW="$ac_cv_decl_EOVERFLOW" - AC_SUBST(EOVERFLOW) - fi -]) - -dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. -dnl Remove this when we can assume autoconf >= 2.61. -m4_ifdef([AC_COMPUTE_INT], [], [ - AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) -])