changeset 9879:e0ce0891df69

Avoid some more autoconf warnings. * m4/acl.m4 (gl_FUNC_ACL): s/AC_HELP_STRING/AS_HELP_STRING/. * m4/afs.m4 (gl_AFS): Likewise. * m4/gc-random.m4 (gl_GC_RANDOM): Likewise. * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): s/AC_FOREACH/m4_foreach_w/. * m4/stdint.m4 (gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED) (gl_INTEGER_TYPE_SUFFIX): Likewise. * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE) (AC_CHECK_DECLS_ONCE): Likewise. Rename file... * m4/onceonly.m4: ...to this, and delete 2.54 variant, now that gnulib-tool requires autoconf 2.59 or better. * gnulib-tool (func_get_filelist): s/\(onceonly\)_2_57.m4/\1.m4/. Signed-off-by: Eric Blake <ebb9@byu.net>
author Eric Blake <ebb9@byu.net>
date Wed, 09 Apr 2008 08:24:35 -0600
parents f3f53950d4f1
children 08e89df21156
files ChangeLog gnulib-tool m4/absolute-header.m4 m4/acl.m4 m4/afs.m4 m4/gc-random.m4 m4/onceonly.m4 m4/onceonly_2_57.m4 m4/stdint.m4
diffstat 9 files changed, 75 insertions(+), 128 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,7 +2,19 @@
 
 	Avoid some autoconf warnings.
 	* m4/regex.m4 (gl_REGEX): s/AC_HELP_STRING/AS_HELP_STRING/.
+	* m4/acl.m4 (gl_FUNC_ACL): Likewise.
+	* m4/afs.m4 (gl_AFS): Likewise.
+	* m4/gc-random.m4 (gl_GC_RANDOM): Likewise.
 	* m4/include_next.m4 (gl_INCLUDE_NEXT): s/AC_FOREACH/m4_foreach_w/.
+	* m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Likewise.
+	* m4/stdint.m4 (gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED)
+	(gl_INTEGER_TYPE_SUFFIX): Likewise.
+	* m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE)
+	(AC_CHECK_DECLS_ONCE): Likewise.
+	Rename file...
+	* m4/onceonly.m4: ...to this, and delete 2.54 variant, now that
+	gnulib-tool requires autoconf 2.59 or better.
+	* gnulib-tool (func_get_filelist): s/\(onceonly\)_2_57.m4/\1.m4/.
 
 2008-04-08  Eric Blake  <ebb9@byu.net>
 
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -1262,8 +1262,7 @@
   echo m4/gnulib-common.m4
   case "$autoconf_minversion" in
     2.59)
-      #echo m4/onceonly.m4
-      echo m4/onceonly_2_57.m4
+      echo m4/onceonly.m4
       ;;
   esac
 }
--- a/m4/absolute-header.m4
+++ b/m4/absolute-header.m4
@@ -1,4 +1,4 @@
-# absolute-header.m4 serial 8
+# absolute-header.m4 serial 9
 dnl Copyright (C) 2006-2008 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -21,7 +21,7 @@
 # provides some type/enum definitions or function/variable declarations.
 AC_DEFUN([gl_ABSOLUTE_HEADER],
 [AC_LANG_PREPROC_REQUIRE()dnl
-AC_FOREACH([gl_HEADER_NAME], [$1],
+m4_foreach_w([gl_HEADER_NAME], [$1],
   [AS_VAR_PUSHDEF([gl_absolute_header],
                   [gl_cv_absolute_]m4_quote(m4_defn([gl_HEADER_NAME])))dnl
   AC_CACHE_CHECK([absolute name of <]m4_quote(m4_defn([gl_HEADER_NAME]))[>],
--- a/m4/acl.m4
+++ b/m4/acl.m4
@@ -1,4 +1,5 @@
 # acl.m4 - check for access control list (ACL) primitives
+# serial 2
 
 # Copyright (C) 2002, 2004-2008 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -13,7 +14,7 @@
   AC_LIBOBJ([file-has-acl])
 
   AC_ARG_ENABLE([acl],
-    AC_HELP_STRING([--disable-acl], [do not support ACLs]),
+    AS_HELP_STRING([--disable-acl], [do not support ACLs]),
     , [enable_acl=auto])
 
   LIB_ACL=
--- a/m4/afs.m4
+++ b/m4/afs.m4
@@ -1,6 +1,6 @@
-#serial 8
+#serial 9
 
-# Copyright (C) 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2004, 2008 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.
@@ -8,8 +8,8 @@
 AC_DEFUN([gl_AFS],
   [
     AC_ARG_WITH(afs,
-                AC_HELP_STRING([--with-afs],
-                               [support for the Andrew File System [[default=no]]]),
+		AS_HELP_STRING([--with-afs],
+			       [support for the Andrew File System [[default=no]]]),
     test "$withval" = no || with_afs=yes, with_afs=no)
     if test "$with_afs" = yes; then
       AC_DEFINE(AFS, 1, [Define if you have the Andrew File System.])
--- a/m4/gc-random.m4
+++ b/m4/gc-random.m4
@@ -1,5 +1,5 @@
-# gc-random.m4 serial 2
-dnl Copyright (C) 2005-2007 Free Software Foundation, Inc.
+# gc-random.m4 serial 3
+dnl Copyright (C) 2005-2008 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.
@@ -39,21 +39,21 @@
 
   AC_MSG_CHECKING([device with (strong) random data...])
   AC_ARG_ENABLE(random-device,
-	AC_HELP_STRING([--enable-random-device],
+	AS_HELP_STRING([--enable-random-device],
 		[device with (strong) randomness (for Nettle)]),
 	NAME_OF_RANDOM_DEVICE=$enableval)
   AC_MSG_RESULT($NAME_OF_RANDOM_DEVICE)
 
   AC_MSG_CHECKING([device with pseudo random data...])
   AC_ARG_ENABLE(pseudo-random-device,
-	AC_HELP_STRING([--enable-pseudo-random-device],
+	AS_HELP_STRING([--enable-pseudo-random-device],
 		[device with pseudo randomness (for Nettle)]),
 	NAME_OF_PSEUDO_RANDOM_DEVICE=$enableval)
   AC_MSG_RESULT($NAME_OF_PSEUDO_RANDOM_DEVICE)
 
   AC_MSG_CHECKING([device with unpredictable data for nonces...])
   AC_ARG_ENABLE(nonce-device,
-	AC_HELP_STRING([--enable-nonce-device],
+	AS_HELP_STRING([--enable-nonce-device],
 		[device with unpredictable nonces (for Nettle)]),
 	NAME_OF_NONCE_DEVICE=$enableval)
   AC_MSG_RESULT($NAME_OF_NONCE_DEVICE)
@@ -72,7 +72,7 @@
         AC_MSG_WARN([[Device `$NAME_OF_NONCE_DEVICE' does not exist, consider to use --enable-nonce-device]]))
     fi
   else
-    AC_MSG_NOTICE([[Cross compiling, assuming random devices exists on the target host...]])  
+    AC_MSG_NOTICE([[Cross compiling, assuming random devices exists on the target host...]])
   fi
 
   # FIXME?: Open+read 42 bytes+close twice and compare data.  Should differ.
--- a/m4/onceonly.m4
+++ b/m4/onceonly.m4
@@ -1,8 +1,10 @@
-# onceonly.m4 serial 5 (gettext-0.15)
-dnl Copyright (C) 2002-2003, 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.
+# onceonly.m4 serial 5
+dnl Copyright (C) 2002-2003, 2005-2006, 2008 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
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
 
 dnl This file defines some "once only" variants of standard autoconf macros.
 dnl   AC_CHECK_HEADERS_ONCE          like  AC_CHECK_HEADERS
@@ -19,45 +21,64 @@
 dnl empty, and the check will be inserted before the body of the AC_DEFUNed
 dnl function.
 
-dnl This file is only needed in autoconf <= 2.59.  Newer versions of autoconf
-dnl have this macro built-in.  But about AC_CHECK_DECLS_ONCE: note that in
-dnl autoconf >= 2.60 the symbol separator is a comma, whereas here it is
-dnl whitespace.
+dnl This is like onceonly.m4, except that it uses diversions to named sections
+dnl DEFAULTS and INIT_PREPARE in order to check all requested headers at once,
+dnl thus reducing the size of 'configure'. Works with autoconf-2.57. The
+dnl size reduction is ca. 9%.
 
-dnl Autoconf version 2.57 or newer is recommended.
-AC_PREREQ(2.54)
+dnl Autoconf version 2.59 plus gnulib is required; this file is not needed
+dnl with Autoconf 2.60 or greater.
+AC_PREREQ([2.59])
 
 # AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of
 # AC_CHECK_HEADERS(HEADER1 HEADER2 ...).
 AC_DEFUN([AC_CHECK_HEADERS_ONCE], [
   :
-  AC_FOREACH([gl_HEADER_NAME], [$1], [
-    AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(m4_defn([gl_HEADER_NAME]),
-                                                 [-./], [___])), [
-      AC_CHECK_HEADERS(gl_HEADER_NAME)
+  m4_foreach_w([gl_HEADER_NAME], [$1], [
+    AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME,
+                                                 [./-], [___])), [
+      m4_divert_text([INIT_PREPARE],
+        [gl_header_list="$gl_header_list gl_HEADER_NAME"])
+      gl_HEADERS_EXPANSION
+      AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_HEADER_NAME])),
+        [Define to 1 if you have the <]m4_defn([gl_HEADER_NAME])[> header file.])
     ])
     AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME,
-                                                   [-./], [___])))
+                                                   [./-], [___])))
   ])
 ])
+m4_define([gl_HEADERS_EXPANSION], [
+  m4_divert_text([DEFAULTS], [gl_header_list=])
+  AC_CHECK_HEADERS([$gl_header_list])
+  m4_define([gl_HEADERS_EXPANSION], [])
+])
 
 # AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of
 # AC_CHECK_FUNCS(FUNC1 FUNC2 ...).
 AC_DEFUN([AC_CHECK_FUNCS_ONCE], [
   :
-  AC_FOREACH([gl_FUNC_NAME], [$1], [
+  m4_foreach_w([gl_FUNC_NAME], [$1], [
     AC_DEFUN([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]), [
-      AC_CHECK_FUNCS(m4_defn([gl_FUNC_NAME]))
+      m4_divert_text([INIT_PREPARE],
+        [gl_func_list="$gl_func_list gl_FUNC_NAME"])
+      gl_FUNCS_EXPANSION
+      AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_FUNC_NAME])),
+        [Define to 1 if you have the `]m4_defn([gl_FUNC_NAME])[' function.])
     ])
     AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]))
   ])
 ])
+m4_define([gl_FUNCS_EXPANSION], [
+  m4_divert_text([DEFAULTS], [gl_func_list=])
+  AC_CHECK_FUNCS([$gl_func_list])
+  m4_define([gl_FUNCS_EXPANSION], [])
+])
 
 # AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of
 # AC_CHECK_DECLS(DECL1, DECL2, ...).
 AC_DEFUN([AC_CHECK_DECLS_ONCE], [
   :
-  AC_FOREACH([gl_DECL_NAME], [$1], [
+  m4_foreach_w([gl_DECL_NAME], [$1], [
     AC_DEFUN([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]), [
       AC_CHECK_DECLS(m4_defn([gl_DECL_NAME]))
     ])
deleted file mode 100644
--- a/m4/onceonly_2_57.m4
+++ /dev/null
@@ -1,86 +0,0 @@
-# onceonly_2_57.m4 serial 4
-dnl Copyright (C) 2002-2003, 2005-2006 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
-dnl Public License, this file may be distributed as part of a program
-dnl that contains a configuration script generated by Autoconf, under
-dnl the same distribution terms as the rest of that program.
-
-dnl This file defines some "once only" variants of standard autoconf macros.
-dnl   AC_CHECK_HEADERS_ONCE          like  AC_CHECK_HEADERS
-dnl   AC_CHECK_FUNCS_ONCE            like  AC_CHECK_FUNCS
-dnl   AC_CHECK_DECLS_ONCE            like  AC_CHECK_DECLS
-dnl   AC_REQUIRE([AC_FUNC_STRCOLL])  like  AC_FUNC_STRCOLL
-dnl The advantage is that the check for each of the headers/functions/decls
-dnl will be put only once into the 'configure' file. It keeps the size of
-dnl the 'configure' file down, and avoids redundant output when 'configure'
-dnl is run.
-dnl The drawback is that the checks cannot be conditionalized. If you write
-dnl   if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi
-dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to
-dnl empty, and the check will be inserted before the body of the AC_DEFUNed
-dnl function.
-
-dnl This is like onceonly.m4, except that it uses diversions to named sections
-dnl DEFAULTS and INIT_PREPARE in order to check all requested headers at once,
-dnl thus reducing the size of 'configure'. Works with autoconf-2.57. The
-dnl size reduction is ca. 9%.
-
-dnl Autoconf version 2.57 or newer is recommended.
-AC_PREREQ(2.57)
-
-# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of
-# AC_CHECK_HEADERS(HEADER1 HEADER2 ...).
-AC_DEFUN([AC_CHECK_HEADERS_ONCE], [
-  :
-  AC_FOREACH([gl_HEADER_NAME], [$1], [
-    AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME,
-                                                 [./-], [___])), [
-      m4_divert_text([INIT_PREPARE],
-        [gl_header_list="$gl_header_list gl_HEADER_NAME"])
-      gl_HEADERS_EXPANSION
-      AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_HEADER_NAME])),
-        [Define to 1 if you have the <]m4_defn([gl_HEADER_NAME])[> header file.])
-    ])
-    AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME,
-                                                   [./-], [___])))
-  ])
-])
-m4_define([gl_HEADERS_EXPANSION], [
-  m4_divert_text([DEFAULTS], [gl_header_list=])
-  AC_CHECK_HEADERS([$gl_header_list])
-  m4_define([gl_HEADERS_EXPANSION], [])
-])
-
-# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of
-# AC_CHECK_FUNCS(FUNC1 FUNC2 ...).
-AC_DEFUN([AC_CHECK_FUNCS_ONCE], [
-  :
-  AC_FOREACH([gl_FUNC_NAME], [$1], [
-    AC_DEFUN([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]), [
-      m4_divert_text([INIT_PREPARE],
-        [gl_func_list="$gl_func_list gl_FUNC_NAME"])
-      gl_FUNCS_EXPANSION
-      AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_FUNC_NAME])),
-        [Define to 1 if you have the `]m4_defn([gl_FUNC_NAME])[' function.])
-    ])
-    AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]))
-  ])
-])
-m4_define([gl_FUNCS_EXPANSION], [
-  m4_divert_text([DEFAULTS], [gl_func_list=])
-  AC_CHECK_FUNCS([$gl_func_list])
-  m4_define([gl_FUNCS_EXPANSION], [])
-])
-
-# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of
-# AC_CHECK_DECLS(DECL1, DECL2, ...).
-AC_DEFUN([AC_CHECK_DECLS_ONCE], [
-  :
-  AC_FOREACH([gl_DECL_NAME], [$1], [
-    AC_DEFUN([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]), [
-      AC_CHECK_DECLS(m4_defn([gl_DECL_NAME]))
-    ])
-    AC_REQUIRE([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]))
-  ])
-])
--- a/m4/stdint.m4
+++ b/m4/stdint.m4
@@ -1,5 +1,5 @@
-# stdint.m4 serial 29
-dnl Copyright (C) 2001-2007 Free Software Foundation, Inc.
+# stdint.m4 serial 30
+dnl Copyright (C) 2001-2008 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.
@@ -240,7 +240,7 @@
   dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into
   dnl   config.h.in,
   dnl - extra AC_SUBST calls, so that the right substitutions are made.
-  AC_FOREACH([gltype], [$1],
+  m4_foreach_w([gltype], [$1],
     [AH_TEMPLATE([BITSIZEOF_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]),
        [Define to the number of bits in type ']gltype['.])])
   for gltype in $1 ; do
@@ -265,7 +265,7 @@
     AC_DEFINE_UNQUOTED([BITSIZEOF_${GLTYPE}], [$result])
     eval BITSIZEOF_${GLTYPE}=\$result
   done
-  AC_FOREACH([gltype], [$1],
+  m4_foreach_w([gltype], [$1],
     [AC_SUBST([BITSIZEOF_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))])
 ])
 
@@ -278,7 +278,7 @@
   dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into
   dnl   config.h.in,
   dnl - extra AC_SUBST calls, so that the right substitutions are made.
-  AC_FOREACH([gltype], [$1],
+  m4_foreach_w([gltype], [$1],
     [AH_TEMPLATE([HAVE_SIGNED_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]),
        [Define to 1 if ']gltype[' is a signed integer type.])])
   for gltype in $1 ; do
@@ -298,7 +298,7 @@
       eval HAVE_SIGNED_${GLTYPE}=0
     fi
   done
-  AC_FOREACH([gltype], [$1],
+  m4_foreach_w([gltype], [$1],
     [AC_SUBST([HAVE_SIGNED_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))])
 ])
 
@@ -311,7 +311,7 @@
   dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into
   dnl   config.h.in,
   dnl - extra AC_SUBST calls, so that the right substitutions are made.
-  AC_FOREACH([gltype], [$1],
+  m4_foreach_w([gltype], [$1],
     [AH_TEMPLATE(translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX],
        [Define to l, ll, u, ul, ull, etc., as suitable for
         constants of type ']gltype['.])])
@@ -350,7 +350,7 @@
     eval ${GLTYPE}_SUFFIX=\$result
     AC_DEFINE_UNQUOTED([${GLTYPE}_SUFFIX], $result)
   done
-  AC_FOREACH([gltype], [$1],
+  m4_foreach_w([gltype], [$1],
     [AC_SUBST(translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX])])
 ])