+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.
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
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
'
$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~
)
(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
+# 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
+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.
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
lib_LTLIBRARIES = libasprintf.la
+noinst_LTLIBRARIES =
+
libasprintf_la_SOURCES = \
lib-asprintf.h lib-asprintf.c \
autosprintf.h autosprintf.cc
$(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.
+++ /dev/null
-/* 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 */
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])
AC_OBJEXT
AC_EXEEXT
+dnl Early checks, assembled by gnulib.
+gl_EARLY
+
dnl Check for build configuration.
gl_WOE32_DLL
LT_INIT([win32-dll])
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`
+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.
EXTRA_DIST = README \
ansi-c++.m4 \
codeset.m4 \
-eoverflow.m4 \
gettext.m4 \
glibc2.m4 \
glibc21.m4 \
+++ /dev/null
-# 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])])
-])