]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Update gnulib files.
authorSimon Josefsson <simon@josefsson.org>
Sun, 1 Feb 2009 10:13:06 +0000 (11:13 +0100)
committerSimon Josefsson <simon@josefsson.org>
Sun, 1 Feb 2009 10:13:06 +0000 (11:13 +0100)
27 files changed:
build-aux/gnupload
gl/Makefile.am
gl/m4/00gnulib.m4 [new file with mode: 0644]
gl/m4/errno_h.m4
gl/m4/extensions.m4
gl/m4/gnulib-common.m4
gl/m4/gnulib-comp.m4
gl/m4/multiarch.m4
gl/m4/pmccabe2html.m4
gl/m4/stdlib_h.m4
gl/stdlib.in.h
gl/tests/test-getaddrinfo.c
gl/version-etc.c
gl/version-etc.h
lib/gl/Makefile.am
lib/gl/m4/00gnulib.m4 [new file with mode: 0644]
lib/gl/m4/errno_h.m4
lib/gl/m4/extensions.m4
lib/gl/m4/gnulib-common.m4
lib/gl/m4/gnulib-comp.m4
lib/gl/m4/multiarch.m4
lib/gl/m4/stdlib_h.m4
lib/gl/stdlib.in.h
libextra/gl/m4/00gnulib.m4 [new file with mode: 0644]
libextra/gl/m4/extensions.m4
libextra/gl/m4/gnulib-common.m4
libextra/gl/m4/gnulib-comp.m4

index 12c939494373ecbe6581e29d8b438c92f9a1b50d..5d4289ffc9b56b0681ae22569858dcc37579ee6a 100755 (executable)
@@ -1,9 +1,9 @@
 #!/bin/sh
 # Sign files and upload them.
 
-scriptversion=2008-11-12.21
+scriptversion=2009-01-30.00
 
-# Copyright (C) 2004, 2005, 2006, 2007, 2008  Free Software Foundation
+# Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation
 #
 # 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
@@ -62,6 +62,9 @@ Multiple-target multiple-file example:
            --to alpha.gnu.org:automake \\
            automake-1.8.2b.tar.gz automake-1.8.2b.tar.bz2
 
+You can get the latest version of this script from savannah:
+<http://git.savannah.gnu.org/cgit/automake.git/plain/lib/gnupload>
+
 Report bugs to <bug-automake@gnu.org>.
 Send patches to <automake-patches@gnu.org>."
 
index 210b381e2a34a93c71d6ab989193f8d1716a4335..c26daca396bbb1f18e2726d90ec37af91aa363c5 100644 (file)
@@ -701,6 +701,7 @@ stdlib.h: stdlib.in.h
          sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
+             -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
              -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \
              -e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \
              -e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \
diff --git a/gl/m4/00gnulib.m4 b/gl/m4/00gnulib.m4
new file mode 100644 (file)
index 0000000..d4d04d1
--- /dev/null
@@ -0,0 +1,30 @@
+# 00gnulib.m4 serial 2
+dnl Copyright (C) 2009 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 This file must be named something that sorts before all other
+dnl gnulib-provided .m4 files.  It is needed until such time as we can
+dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE semantics.
+
+# AC_DEFUN_ONCE([NAME], VALUE)
+# ----------------------------
+# Define NAME to expand to VALUE on the first use (whether by direct
+# expansion, or by AC_REQUIRE), and to nothing on all subsequent uses.
+# Avoid bugs in AC_REQUIRE in Autoconf 2.63 and earlier.  This
+# definition is slower than the version in Autoconf 2.64, because it
+# can only use interfaces that existed since 2.59; but it achieves the
+# same effect.  Quoting is necessary to avoid confusing Automake.
+m4_version_prereq([2.63.263], [],
+[m4_define([AC][_DEFUN_ONCE],
+  [AC][_DEFUN([$1],
+    [AC_REQUIRE([_gl_DEFUN_ONCE([$1])],
+      [m4_indir([_gl_DEFUN_ONCE([$1])])])])]dnl
+[AC][_DEFUN([_gl_DEFUN_ONCE([$1])], [$2])])])
+
+# gl_00GNULIB
+# -----------
+# Witness macro that this file has been included.  Needed to force
+# Automake to include this file prior to all other gnulib .m4 files.
+AC_DEFUN([gl_00GNULIB])
index 0682d1ab63b8912ea1079605f159227de754927c..4d77672cb70e7190bd36a09fe84c272d9c9c0766 100644 (file)
@@ -1,17 +1,11 @@
-# errno_h.m4 serial 3
+# errno_h.m4 serial 4
 dnl Copyright (C) 2004, 2006, 2008, 2009 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.
 
-AC_DEFUN([gl_HEADER_ERRNO_H],
-[
-  dnl Use AC_REQUIRE here, so that the default behavior below is expanded
-  dnl once only, before all statements that occur in other macros.
-  AC_REQUIRE([gl_HEADER_ERRNO_H_BODY])
-])
-
-AC_DEFUN([gl_HEADER_ERRNO_H_BODY],
+dnl This macro must pass through AC_REQUIRE (never directly invoke it).
+AC_DEFUN_ONCE([gl_HEADER_ERRNO_H],
 [
   AC_REQUIRE([AC_PROG_CC])
   AC_CACHE_CHECK([for complete errno.h], [gl_cv_header_errno_h_complete], [
index 611fcfdbc402350d9f3e7fdc6f10c5a7a748e5e0..ba6d5e190f9f2df6ae1b080fc8f2d16490b5e3b2 100644 (file)
@@ -1,7 +1,7 @@
-# serial 6  -*- Autoconf -*-
+# serial 8  -*- Autoconf -*-
 # Enable extensions on systems that normally disable them.
 
-# Copyright (C) 2003, 2006-2008 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2009 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -20,7 +20,7 @@
 # AC_DEFINE.  The goal here is to define all known feature-enabling
 # macros, then, if reports of conflicts are made, disable macros that
 # cause problems on some platforms (such as __EXTENSIONS__).
-AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
+AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS],
 [AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
 AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
 
@@ -90,5 +90,15 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
 # ------------------------
 # Enable extensions on systems that normally disable them,
 # typically due to standards-conformance issues.
-AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS],
-  [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])])
+AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS],
+[
+  dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS.
+  dnl gnulib does not need it. But if it gets required by third-party macros
+  dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a
+  dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS".
+  dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE,
+  dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck.
+  AC_REQUIRE([AC_GNU_SOURCE])
+
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+])
index cfd1b99f82ed204e10cf865c4e3bb511a711c138..50e399aa1c18f37ff4f1737df0db707d6ecef6a6 100644 (file)
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 8
+# gnulib-common.m4 serial 10
 dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,6 +8,7 @@ dnl with or without modifications, as long as this notice is preserved.
 # is expanded unconditionally through gnulib-tool magic.
 AC_DEFUN([gl_COMMON], [
   dnl Use AC_REQUIRE here, so that the code is expanded once only.
+  AC_REQUIRE([gl_00GNULIB])
   AC_REQUIRE([gl_COMMON_BODY])
 ])
 AC_DEFUN([gl_COMMON_BODY], [
@@ -52,7 +53,7 @@ m4_ifndef([m4_foreach_w],
 # is a backport of autoconf-2.60's AC_PROG_MKDIR_P.
 # Remove this macro when we can assume autoconf >= 2.60.
 m4_ifdef([AC_PROG_MKDIR_P], [], [
-  AC_DEFUN([AC_PROG_MKDIR_P],
+  AC_DEFUN_ONCE([AC_PROG_MKDIR_P],
     [AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
      MKDIR_P='$(mkdir_p)'
      AC_SUBST([MKDIR_P])])])
index 79bab7e942b0a284ce52a5af6685efad81cd92f8..42a1e8dfdf252982df49a6073097ce7cecabff9d 100644 (file)
@@ -25,7 +25,6 @@ AC_DEFUN([gl_EARLY],
   m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
   m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
   AC_REQUIRE([AC_PROG_RANLIB])
-  AC_REQUIRE([AC_GNU_SOURCE])
   AB_INIT
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
   AC_REQUIRE([AC_FUNC_FSEEKO])
@@ -73,7 +72,7 @@ AC_SUBST([LTALLOCA])
     AC_LIBOBJ([connect])
   fi
   gl_SYS_SOCKET_MODULE_INDICATOR([connect])
-  gl_HEADER_ERRNO_H
+  AC_REQUIRE([gl_HEADER_ERRNO_H])
   gl_ERROR
   m4_ifdef([AM_XGETTEXT_OPTION],
     [AM_XGETTEXT_OPTION([--flag=error:3:c-format])
@@ -115,7 +114,7 @@ AC_SUBST([LTALLOCA])
   gl_FUNC_LSEEK
   gl_UNISTD_MODULE_INDICATOR([lseek])
   gl_MINMAX
-  gl_MULTIARCH
+  AC_REQUIRE([gl_MULTIARCH])
   gl_HEADER_NETDB
   gl_HEADER_NETINET_IN
   AC_PROG_MKDIR_P
@@ -412,6 +411,7 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/wchar.in.h
   lib/winsock-select.c
   lib/xsize.h
+  m4/00gnulib.m4
   m4/alloca.m4
   m4/arpa_inet_h.m4
   m4/autobuild.m4
index 7b73e15ee9dcf6f9d70c38c79f9af7e83666c962..3948e6e0dba4d5962e23537dca014cc43d1183f0 100644 (file)
@@ -1,5 +1,5 @@
-# multiarch.m4 serial 3
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+# multiarch.m4 serial 4
+dnl Copyright (C) 2008, 2009 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.
@@ -19,16 +19,8 @@ dnl with or without modifications, as long as this notice is preserved.
 # Detect this situation and set the macro AA_APPLE_UNIVERSAL_BUILD at the
 # beginning of config.h and set APPLE_UNIVERSAL_BUILD accordingly.
 
-AC_DEFUN([gl_MULTIARCH],
-[
-  dnl This AC_REQUIRE is not necessary in theory. It works around a bug in
-  dnl autoconf <= 2.63: AC_REQUIRE invocations inside AC_REQUIREd macros are
-  dnl being handled better than AC_REQUIRE invocations inside normally invoked
-  dnl macros.
-  AC_REQUIRE([gl_MULTIARCH_BODY])
-])
-
-AC_DEFUN([gl_MULTIARCH_BODY],
+dnl This macro must pass through AC_REQUIRE (never directly invoke it).
+AC_DEFUN_ONCE([gl_MULTIARCH],
 [
   dnl Code similar to autoconf-2.63 AC_C_BIGENDIAN.
   gl_cv_c_multiarch=no
index 5e207422d330c5b3aba6d59ee4c4b306f8115d6d..2985f7c6d234d882ba2fe90e36ef49211df6c0ff 100644 (file)
@@ -1,5 +1,5 @@
-# pmccabe2html.m4 serial 1
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+# pmccabe2html.m4 serial 2
+dnl Copyright (C) 2008, 2009 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.
@@ -9,6 +9,6 @@ dnl From Simon Josefsson
 # Usage: gl_PMCCABE2HTML([]).
 AC_DEFUN([gl_PMCCABE2HTML],
 [
-  AC_PROG_AWK
+  AC_REQUIRE([AC_PROG_AWK])
   AC_PATH_PROG([PMCCABE], [pmccabe], [false])
 ])
index 582db13dffa0080a12b651d532b4ed8a2280aec7..515befeb7e962adf71c50171bf854d0a3402ca1e 100644 (file)
@@ -1,5 +1,5 @@
-# stdlib_h.m4 serial 13
-dnl Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+# stdlib_h.m4 serial 14
+dnl Copyright (C) 2007-2009 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.
@@ -8,9 +8,20 @@ AC_DEFUN([gl_STDLIB_H],
 [
   AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
   gl_CHECK_NEXT_HEADERS([stdlib.h])
+  AC_CHECK_HEADERS([random.h])
+  if test $ac_cv_header_random_h = yes; then
+    HAVE_RANDOM_H=1
+  else
+    HAVE_RANDOM_H=0
+  fi
+  AC_SUBST([HAVE_RANDOM_H])
   AC_CHECK_TYPES([struct random_data],
     [], [HAVE_STRUCT_RANDOM_DATA=0],
-    [[#include <stdlib.h>]])
+    [[#include <stdlib.h>
+      #if HAVE_RANDOM_H
+      # include <random.h>
+      #endif
+    ]])
 ])
 
 AC_DEFUN([gl_STDLIB_MODULE_INDICATOR],
index 3820b10971888851f3955580616c60c192ccf9ee..f99767f600f6c721671db6f74b5ce79c59c28d1a 100644 (file)
@@ -1,6 +1,6 @@
 /* A GNU-like <stdlib.h>.
 
-   Copyright (C) 1995, 2001-2004, 2006-2008 Free Software Foundation, Inc.
+   Copyright (C) 1995, 2001-2004, 2006-2009 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
 # include <sys/loadavg.h>
 #endif
 
+/* OSF/1 5.1 declares 'struct random_data' in <random.h>, which is included
+   from <stdlib.h> if _REENTRANT is defined.  Include it always.  */
+#if @HAVE_RANDOM_H@
+# include <random.h>
+#endif
+
 #if @GNULIB_RANDOM_R@ || !@HAVE_STRUCT_RANDOM_DATA@
 # include <stdint.h>
 #endif
index a887cb1a99e11810d5b4a3912879d763bb645553..a8b2fd5d4615cb2166061b05fe3a4e0f46d64df9 100644 (file)
@@ -1,6 +1,6 @@
 /* Test the getaddrinfo module.
 
-   Copyright (C) 2006-2008 Free Software Foundation, Inc.
+   Copyright (C) 2006-2009 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
@@ -64,6 +64,14 @@ int simple (char *host, char *service)
 
   if (res != 0)
     {
+      /* EAI_AGAIN is returned if no network is available. Don't fail
+        the test merely because someone is down the country on their
+        in-law's farm. */
+      if (res == EAI_AGAIN)
+       {
+         fprintf (stderr, "skipping getaddrinfo test: no network?\n");
+         return 77;
+       }
       /* IRIX reports EAI_NONAME for "https".  Don't fail the test
         merely because of this.  */
       if (res == EAI_NONAME)
index 6ef1cca70cc8c932800ca2fd16d794815e72b354..2258c2e21d04e84665e8803b170773415ea0ff62 100644 (file)
@@ -1,4 +1,4 @@
-/* Utility to help print --version output in a consistent format.
+/* Print --version and bug-reporting information in a consistent format.
    Copyright (C) 1999-2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
@@ -66,7 +66,7 @@ version_etc_va (FILE *stream,
 
   fputs (_("\
 \n\
-License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n\
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.\n\
 This is free software: you are free to change and redistribute it.\n\
 There is NO WARRANTY, to the extent permitted by law.\n\
 \n\
@@ -170,3 +170,17 @@ version_etc (FILE *stream,
   va_start (authors, version);
   version_etc_va (stream, command_name, package, version, authors);
 }
+
+void
+emit_bug_reporting_address (void)
+{
+  /* TRANSLATORS: The placeholder indicates the bug-reporting address
+     for this package.  Please add _another line_ saying
+     "Report translation bugs to <...>\n" with the address for translation
+     bugs (typically your translation team's web or email address).  */
+  printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
+  printf (_("%s home page: <http://www.gnu.org/software/%s/>.\n"),
+         PACKAGE_NAME, PACKAGE);
+  fputs (_("General help using GNU software: <http://www.gnu.org/gethelp/>.\n"),
+         stdout);
+}
index d9d1340eb587e12ea730428822e763353f46bae4..33a8e7f14352b4eabc54d66a407458c4c0806b58 100644 (file)
@@ -1,5 +1,5 @@
-/* Utility to help print --version output in a consistent format.
-   Copyright (C) 1999, 2003, 2005 Free Software Foundation, Inc.
+/* Print --version and bug-reporting information in a consistent format.
+   Copyright (C) 1999, 2003, 2005, 2009 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
@@ -31,6 +31,8 @@ extern void version_etc_va (FILE *stream,
 extern void version_etc (FILE *stream,
                         const char *command_name, const char *package,
                         const char *version,
-                        /* const char *author1, ...*/ ...);
+                        /* const char *author1, ...*/ ...);
+
+extern void emit_bug_reporting_address (void);
 
 #endif /* VERSION_ETC_H */
index 09ddad4f4a0a73b7d1327fcf012ec71fb996dca3..fd1e88972fff6885da8d13ea603b7e558d3e1b76 100644 (file)
@@ -434,6 +434,7 @@ stdlib.h: stdlib.in.h
          sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
+             -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
              -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \
              -e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \
              -e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \
diff --git a/lib/gl/m4/00gnulib.m4 b/lib/gl/m4/00gnulib.m4
new file mode 100644 (file)
index 0000000..d4d04d1
--- /dev/null
@@ -0,0 +1,30 @@
+# 00gnulib.m4 serial 2
+dnl Copyright (C) 2009 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 This file must be named something that sorts before all other
+dnl gnulib-provided .m4 files.  It is needed until such time as we can
+dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE semantics.
+
+# AC_DEFUN_ONCE([NAME], VALUE)
+# ----------------------------
+# Define NAME to expand to VALUE on the first use (whether by direct
+# expansion, or by AC_REQUIRE), and to nothing on all subsequent uses.
+# Avoid bugs in AC_REQUIRE in Autoconf 2.63 and earlier.  This
+# definition is slower than the version in Autoconf 2.64, because it
+# can only use interfaces that existed since 2.59; but it achieves the
+# same effect.  Quoting is necessary to avoid confusing Automake.
+m4_version_prereq([2.63.263], [],
+[m4_define([AC][_DEFUN_ONCE],
+  [AC][_DEFUN([$1],
+    [AC_REQUIRE([_gl_DEFUN_ONCE([$1])],
+      [m4_indir([_gl_DEFUN_ONCE([$1])])])])]dnl
+[AC][_DEFUN([_gl_DEFUN_ONCE([$1])], [$2])])])
+
+# gl_00GNULIB
+# -----------
+# Witness macro that this file has been included.  Needed to force
+# Automake to include this file prior to all other gnulib .m4 files.
+AC_DEFUN([gl_00GNULIB])
index 0682d1ab63b8912ea1079605f159227de754927c..4d77672cb70e7190bd36a09fe84c272d9c9c0766 100644 (file)
@@ -1,17 +1,11 @@
-# errno_h.m4 serial 3
+# errno_h.m4 serial 4
 dnl Copyright (C) 2004, 2006, 2008, 2009 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.
 
-AC_DEFUN([gl_HEADER_ERRNO_H],
-[
-  dnl Use AC_REQUIRE here, so that the default behavior below is expanded
-  dnl once only, before all statements that occur in other macros.
-  AC_REQUIRE([gl_HEADER_ERRNO_H_BODY])
-])
-
-AC_DEFUN([gl_HEADER_ERRNO_H_BODY],
+dnl This macro must pass through AC_REQUIRE (never directly invoke it).
+AC_DEFUN_ONCE([gl_HEADER_ERRNO_H],
 [
   AC_REQUIRE([AC_PROG_CC])
   AC_CACHE_CHECK([for complete errno.h], [gl_cv_header_errno_h_complete], [
index 611fcfdbc402350d9f3e7fdc6f10c5a7a748e5e0..ba6d5e190f9f2df6ae1b080fc8f2d16490b5e3b2 100644 (file)
@@ -1,7 +1,7 @@
-# serial 6  -*- Autoconf -*-
+# serial 8  -*- Autoconf -*-
 # Enable extensions on systems that normally disable them.
 
-# Copyright (C) 2003, 2006-2008 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2009 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -20,7 +20,7 @@
 # AC_DEFINE.  The goal here is to define all known feature-enabling
 # macros, then, if reports of conflicts are made, disable macros that
 # cause problems on some platforms (such as __EXTENSIONS__).
-AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
+AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS],
 [AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
 AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
 
@@ -90,5 +90,15 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
 # ------------------------
 # Enable extensions on systems that normally disable them,
 # typically due to standards-conformance issues.
-AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS],
-  [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])])
+AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS],
+[
+  dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS.
+  dnl gnulib does not need it. But if it gets required by third-party macros
+  dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a
+  dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS".
+  dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE,
+  dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck.
+  AC_REQUIRE([AC_GNU_SOURCE])
+
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+])
index cfd1b99f82ed204e10cf865c4e3bb511a711c138..50e399aa1c18f37ff4f1737df0db707d6ecef6a6 100644 (file)
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 8
+# gnulib-common.m4 serial 10
 dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,6 +8,7 @@ dnl with or without modifications, as long as this notice is preserved.
 # is expanded unconditionally through gnulib-tool magic.
 AC_DEFUN([gl_COMMON], [
   dnl Use AC_REQUIRE here, so that the code is expanded once only.
+  AC_REQUIRE([gl_00GNULIB])
   AC_REQUIRE([gl_COMMON_BODY])
 ])
 AC_DEFUN([gl_COMMON_BODY], [
@@ -52,7 +53,7 @@ m4_ifndef([m4_foreach_w],
 # is a backport of autoconf-2.60's AC_PROG_MKDIR_P.
 # Remove this macro when we can assume autoconf >= 2.60.
 m4_ifdef([AC_PROG_MKDIR_P], [], [
-  AC_DEFUN([AC_PROG_MKDIR_P],
+  AC_DEFUN_ONCE([AC_PROG_MKDIR_P],
     [AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
      MKDIR_P='$(mkdir_p)'
      AC_SUBST([MKDIR_P])])])
index 242e33652bb370b94c41bc482613c9543c7982a5..10283237821bf9eb7e0577f3d8879e0f80938023 100644 (file)
@@ -25,7 +25,6 @@ AC_DEFUN([lgl_EARLY],
   m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
   m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
   AC_REQUIRE([AC_PROG_RANLIB])
-  AC_REQUIRE([AC_GNU_SOURCE])
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
   AC_REQUIRE([AC_FUNC_FSEEKO])
 ])
@@ -45,7 +44,7 @@ AC_DEFUN([lgl_INIT],
   gl_source_base='lib/gl'
   gl_FUNC_ALLOCA
   gl_BYTESWAP
-  gl_HEADER_ERRNO_H
+  AC_REQUIRE([gl_HEADER_ERRNO_H])
   gl_FLOAT_H
   gl_FUNC_FSEEKO
   gl_STDIO_MODULE_INDICATOR([fseeko])
@@ -60,7 +59,7 @@ AC_DEFUN([lgl_INIT],
   gl_STRING_MODULE_INDICATOR([memmem])
   gl_FUNC_MEMMOVE
   gl_MINMAX
-  gl_MULTIARCH
+  AC_REQUIRE([gl_MULTIARCH])
   gl_HEADER_NETDB
   gl_FUNC_READ_FILE
   gl_FUNC_REALLOC_POSIX
@@ -279,6 +278,7 @@ AC_DEFUN([lgl_FILE_LIST], [
   lib/vasprintf.c
   lib/wchar.in.h
   lib/xsize.h
+  m4/00gnulib.m4
   m4/alloca.m4
   m4/byteswap.m4
   m4/codeset.m4
index 7b73e15ee9dcf6f9d70c38c79f9af7e83666c962..3948e6e0dba4d5962e23537dca014cc43d1183f0 100644 (file)
@@ -1,5 +1,5 @@
-# multiarch.m4 serial 3
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+# multiarch.m4 serial 4
+dnl Copyright (C) 2008, 2009 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.
@@ -19,16 +19,8 @@ dnl with or without modifications, as long as this notice is preserved.
 # Detect this situation and set the macro AA_APPLE_UNIVERSAL_BUILD at the
 # beginning of config.h and set APPLE_UNIVERSAL_BUILD accordingly.
 
-AC_DEFUN([gl_MULTIARCH],
-[
-  dnl This AC_REQUIRE is not necessary in theory. It works around a bug in
-  dnl autoconf <= 2.63: AC_REQUIRE invocations inside AC_REQUIREd macros are
-  dnl being handled better than AC_REQUIRE invocations inside normally invoked
-  dnl macros.
-  AC_REQUIRE([gl_MULTIARCH_BODY])
-])
-
-AC_DEFUN([gl_MULTIARCH_BODY],
+dnl This macro must pass through AC_REQUIRE (never directly invoke it).
+AC_DEFUN_ONCE([gl_MULTIARCH],
 [
   dnl Code similar to autoconf-2.63 AC_C_BIGENDIAN.
   gl_cv_c_multiarch=no
index 582db13dffa0080a12b651d532b4ed8a2280aec7..515befeb7e962adf71c50171bf854d0a3402ca1e 100644 (file)
@@ -1,5 +1,5 @@
-# stdlib_h.m4 serial 13
-dnl Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+# stdlib_h.m4 serial 14
+dnl Copyright (C) 2007-2009 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.
@@ -8,9 +8,20 @@ AC_DEFUN([gl_STDLIB_H],
 [
   AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
   gl_CHECK_NEXT_HEADERS([stdlib.h])
+  AC_CHECK_HEADERS([random.h])
+  if test $ac_cv_header_random_h = yes; then
+    HAVE_RANDOM_H=1
+  else
+    HAVE_RANDOM_H=0
+  fi
+  AC_SUBST([HAVE_RANDOM_H])
   AC_CHECK_TYPES([struct random_data],
     [], [HAVE_STRUCT_RANDOM_DATA=0],
-    [[#include <stdlib.h>]])
+    [[#include <stdlib.h>
+      #if HAVE_RANDOM_H
+      # include <random.h>
+      #endif
+    ]])
 ])
 
 AC_DEFUN([gl_STDLIB_MODULE_INDICATOR],
index baf21a4415f6420ce7fbde0b9132bffbb598fed0..4e6dfd3bf95c0440e94efbbc909f4e013f34df12 100644 (file)
@@ -1,6 +1,6 @@
 /* A GNU-like <stdlib.h>.
 
-   Copyright (C) 1995, 2001-2004, 2006-2008 Free Software Foundation, Inc.
+   Copyright (C) 1995, 2001-2004, 2006-2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
 # include <sys/loadavg.h>
 #endif
 
+/* OSF/1 5.1 declares 'struct random_data' in <random.h>, which is included
+   from <stdlib.h> if _REENTRANT is defined.  Include it always.  */
+#if @HAVE_RANDOM_H@
+# include <random.h>
+#endif
+
 #if @GNULIB_RANDOM_R@ || !@HAVE_STRUCT_RANDOM_DATA@
 # include <stdint.h>
 #endif
diff --git a/libextra/gl/m4/00gnulib.m4 b/libextra/gl/m4/00gnulib.m4
new file mode 100644 (file)
index 0000000..d4d04d1
--- /dev/null
@@ -0,0 +1,30 @@
+# 00gnulib.m4 serial 2
+dnl Copyright (C) 2009 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 This file must be named something that sorts before all other
+dnl gnulib-provided .m4 files.  It is needed until such time as we can
+dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE semantics.
+
+# AC_DEFUN_ONCE([NAME], VALUE)
+# ----------------------------
+# Define NAME to expand to VALUE on the first use (whether by direct
+# expansion, or by AC_REQUIRE), and to nothing on all subsequent uses.
+# Avoid bugs in AC_REQUIRE in Autoconf 2.63 and earlier.  This
+# definition is slower than the version in Autoconf 2.64, because it
+# can only use interfaces that existed since 2.59; but it achieves the
+# same effect.  Quoting is necessary to avoid confusing Automake.
+m4_version_prereq([2.63.263], [],
+[m4_define([AC][_DEFUN_ONCE],
+  [AC][_DEFUN([$1],
+    [AC_REQUIRE([_gl_DEFUN_ONCE([$1])],
+      [m4_indir([_gl_DEFUN_ONCE([$1])])])])]dnl
+[AC][_DEFUN([_gl_DEFUN_ONCE([$1])], [$2])])])
+
+# gl_00GNULIB
+# -----------
+# Witness macro that this file has been included.  Needed to force
+# Automake to include this file prior to all other gnulib .m4 files.
+AC_DEFUN([gl_00GNULIB])
index 611fcfdbc402350d9f3e7fdc6f10c5a7a748e5e0..ba6d5e190f9f2df6ae1b080fc8f2d16490b5e3b2 100644 (file)
@@ -1,7 +1,7 @@
-# serial 6  -*- Autoconf -*-
+# serial 8  -*- Autoconf -*-
 # Enable extensions on systems that normally disable them.
 
-# Copyright (C) 2003, 2006-2008 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2009 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -20,7 +20,7 @@
 # AC_DEFINE.  The goal here is to define all known feature-enabling
 # macros, then, if reports of conflicts are made, disable macros that
 # cause problems on some platforms (such as __EXTENSIONS__).
-AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
+AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS],
 [AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
 AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
 
@@ -90,5 +90,15 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
 # ------------------------
 # Enable extensions on systems that normally disable them,
 # typically due to standards-conformance issues.
-AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS],
-  [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])])
+AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS],
+[
+  dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS.
+  dnl gnulib does not need it. But if it gets required by third-party macros
+  dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a
+  dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS".
+  dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE,
+  dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck.
+  AC_REQUIRE([AC_GNU_SOURCE])
+
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+])
index cfd1b99f82ed204e10cf865c4e3bb511a711c138..50e399aa1c18f37ff4f1737df0db707d6ecef6a6 100644 (file)
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 8
+# gnulib-common.m4 serial 10
 dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,6 +8,7 @@ dnl with or without modifications, as long as this notice is preserved.
 # is expanded unconditionally through gnulib-tool magic.
 AC_DEFUN([gl_COMMON], [
   dnl Use AC_REQUIRE here, so that the code is expanded once only.
+  AC_REQUIRE([gl_00GNULIB])
   AC_REQUIRE([gl_COMMON_BODY])
 ])
 AC_DEFUN([gl_COMMON_BODY], [
@@ -52,7 +53,7 @@ m4_ifndef([m4_foreach_w],
 # is a backport of autoconf-2.60's AC_PROG_MKDIR_P.
 # Remove this macro when we can assume autoconf >= 2.60.
 m4_ifdef([AC_PROG_MKDIR_P], [], [
-  AC_DEFUN([AC_PROG_MKDIR_P],
+  AC_DEFUN_ONCE([AC_PROG_MKDIR_P],
     [AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
      MKDIR_P='$(mkdir_p)'
      AC_SUBST([MKDIR_P])])])
index 64eec35f50259edab045719afaa083754492af02..371c4bc3bafbe2c45b7b89776acc8e03a450bc8f 100644 (file)
@@ -179,6 +179,7 @@ AC_DEFUN([xgl_FILE_LIST], [
   lib/md5.h
   lib/memxor.c
   lib/memxor.h
+  m4/00gnulib.m4
   m4/extensions.m4
   m4/gnulib-common.m4
   m4/hmac-md5.m4