]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Invoke gnulib-tool also for gettext-runtime/libasprintf.
authorBruno Haible <bruno@clisp.org>
Sat, 15 Aug 2009 15:19:17 +0000 (17:19 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 15 Aug 2009 17:20:28 +0000 (19:20 +0200)
ChangeLog
Makefile.am
autogen.sh
gettext-runtime/libasprintf/.gitignore
gettext-runtime/libasprintf/ChangeLog
gettext-runtime/libasprintf/Makefile.am
gettext-runtime/libasprintf/alloca.in.h [deleted file]
gettext-runtime/libasprintf/configure.ac
gettext-runtime/m4/ChangeLog
gettext-runtime/m4/Makefile.am
gettext-runtime/m4/eoverflow.m4 [deleted file]

index 10792808923e1a09e4e49f6945940f175cdf43a4..72c03a66389b02c7f7bdcb59450d25ae241654ba 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2009-08-14  Bruno Haible  <bruno@clisp.org>
+
+       * 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  <bruno@clisp.org>
 
        Remove automatically copied files from version control.
index d714a051a4c1cafbb02d9eab007948cb257339e2..9ca7eca468e3d5cad2b18da38eea3782da7198e5 100644 (file)
@@ -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
 
index b88296ec49a1ea2519652342f324330f9540ec36..2f0045899a4513d9905f2bd3cd2fcd629bce2b1c 100755 (executable)
@@ -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
index f03196417bf2b78a124329de9b0a3905de463e85..c1ca536dee8d13471dc8b52bcd410ca87fe5463c 100644 (file)
@@ -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
index dacf53682d3407cf75d30c40675e421eb020209b..33960518a7d6c0de1606580fa8f48ee6e6438af2 100644 (file)
@@ -1,3 +1,14 @@
+2009-08-14  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        * vasnprintf.c (DCHAR_SET): Undefine at the end.
index e52208e200dfc26d981e3395918b0b4c71799654..54bbf3ef304a8fd1431356addb5e9cd15b0a3bb3 100644 (file)
@@ -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 <alloca.h> 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 (file)
index a953bd4..0000000
+++ /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 <malloc.h>
-#   define alloca _alloca
-#  else
-#   if HAVE_ALLOCA_H
-#    include <alloca.h>
-#   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 */
index 5b247afd132a81f16279744bb3aa5bf3340e5346..162e73ba746cdfd4cb72035a2b2965d26fc129e9 100644 (file)
@@ -16,7 +16,7 @@ dnl along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 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 <stdio.h>])
 gt_PRINTF_POSIX
-gl_EOVERFLOW
 
 dnl Check for tools needed for formatting the documentation.
 ac_aux_dir_abs=`cd $ac_aux_dir && pwd`
index 06fcea8d2ab6afa5ef49171fc65a3a4dd58aa316..8d699b9419c7f973cad4d5bd6bf67c5b77be73a9 100644 (file)
@@ -1,3 +1,8 @@
+2009-08-14  Bruno Haible  <bruno@clisp.org>
+
+       * eoverflow.m4: Remove file. Obsoleted by gnulib's 'errno' module.
+       * Makefile.am (EXTRA_DIST): Remove it.
+
 2009-08-14  Bruno Haible  <bruno@clisp.org>
 
        Disable multithread support by default on Cygwin 1.5.x for real.
index 9bcb87b86fc708d2b1518da61426162c2077adcd..5dcfc68270669e33d7427c260426e791e5680c1d 100644 (file)
@@ -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 (file)
index 3bffd10..0000000
+++ /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 <errno.h>, 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 <errno.h>, 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 <errno.h>
-#ifdef EOVERFLOW
-yes
-#endif
-      ], have_eoverflow=1)
-    if test -n "$have_eoverflow"; then
-      dnl EOVERFLOW exists in <errno.h>. Don't need to define EOVERFLOW ourselves.
-      ac_cv_decl_EOVERFLOW=yes
-    else
-      AC_EGREP_CPP(yes,[
-#define _XOPEN_SOURCE_EXTENDED 1
-#include <errno.h>
-#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 <errno.h>
-/* The following two lines are a workaround against an autoconf-2.52 bug.  */
-#include <stdio.h>
-#include <stdlib.h>
-])
-      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])])
-])