autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

30-fyi-more-default-headers.patch


From: Akim Demaille
Subject: 30-fyi-more-default-headers.patch
Date: Wed, 10 Oct 2001 15:08:41 +0200

Index: ChangeLog
from  Akim Demaille  <address@hidden>
        
        * lib/autoconf/general.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS)
        (AC_INCLUDES_DEFAULT): Move to...
        * lib/autoconf/headers.m4: here.
        * lib/autoconf/types.m4: Comment changes.
        * doc/autoconf.texi: Specify where the default includes are used
        in the macro prototypes.
        
Index: doc/autoconf.texi
--- doc/autoconf.texi Tue, 09 Oct 2001 21:25:03 +0200 akim
+++ doc/autoconf.texi Tue, 09 Oct 2001 21:35:30 +0200 akim
@@ -4184,7 +4184,7 @@ @node Generic Headers
 as well as find out whether it is present, you have to write your own
 test for it (@pxref{Writing Tests}).
 
address@hidden AC_CHECK_HEADER (@var{header-file}, @ovar{action-if-found}, 
@ovar{action-if-not-found}, @ovar{includes})
address@hidden AC_CHECK_HEADER (@var{header-file}, @ovar{action-if-found}, 
@ovar{action-if-not-found}, @dvar{includes, default-includes})
 @acindex CHECK_HEADER
 If the system header file @var{header-file} is usable, execute shell
 commands @var{action-if-found}, otherwise execute
@@ -4224,7 +4224,7 @@ @node Generic Headers
 with success.
 @end defmac
 
address@hidden AC_CHECK_HEADERS (@address@hidden, @ovar{action-if-found}, 
@ovar{action-if-not-found}, @ovar{includes})
address@hidden AC_CHECK_HEADERS (@address@hidden, @ovar{action-if-found}, 
@ovar{action-if-not-found}, @dvar{includes, default-includes})
 @acindex CHECK_HEADERS
 @cvindex address@hidden
 For each given system header file @var{header-file} in the
@@ -4273,7 +4273,7 @@ @node Generic Declarations
 These macros are used to find declarations not covered by the ``particular''
 test macros.
 
address@hidden AC_CHECK_DECL (@var{symbol}, @ovar{action-if-found}, 
@ovar{action-if-not-found}, @ovar{includes})
address@hidden AC_CHECK_DECL (@var{symbol}, @ovar{action-if-found}, 
@ovar{action-if-not-found}, @dvar{includes, default-includes})
 @acindex CHECK_DECL
 If @var{symbol} (a function or a variable) is not declared in
 @var{includes} and a declaration is needed, run the shell commands
@@ -4286,7 +4286,7 @@ @node Generic Declarations
 introducing extra declarations when they are not needed.
 @end defmac
 
address@hidden AC_CHECK_DECLS (@var{symbols}, @ovar{action-if-found}, 
@ovar{action-if-not-found}, @ovar{includes})
address@hidden AC_CHECK_DECLS (@var{symbols}, @ovar{action-if-found}, 
@ovar{action-if-not-found}, @dvar{includes, default-includes})
 @acindex CHECK_DECLS
 @cvindex address@hidden
 For each of the @var{symbols} (@emph{comma}-separated list), define
@@ -4417,7 +4417,7 @@ @node Generic Structures
 These macros are used to find structure members not covered by the
 ``particular'' test macros.
 
address@hidden AC_CHECK_MEMBER (@address@hidden, @ovar{action-if-found}, 
@ovar{action-if-not-found}, @ovar{includes})
address@hidden AC_CHECK_MEMBER (@address@hidden, @ovar{action-if-found}, 
@ovar{action-if-not-found}, @dvar{includes, default-includes})
 @acindex CHECK_MEMBER
 Check whether @var{member} is a member of the aggregate @var{aggregate}.
 If no @var{includes} are specified, the default includes are used
@@ -4436,7 +4436,7 @@ @node Generic Structures
 @end example
 @end defmac
 
address@hidden AC_CHECK_MEMBERS (@var{members}, @ovar{action-if-found}, 
@ovar{action-if-not-found}, @ovar{includes})
address@hidden AC_CHECK_MEMBERS (@var{members}, @ovar{action-if-found}, 
@ovar{action-if-not-found}, @dvar{includes, default-includes})
 @acindex CHECK_MEMBERS
 Check for the existence of each @address@hidden@var{member}} of
 @var{members} using the previous macro.  When @var{member} belongs to
@@ -4534,14 +4534,14 @@ @node Generic Types
 These macros are used to check for types not covered by the ``particular''
 test macros.
 
address@hidden AC_CHECK_TYPE (@var{type}, @ovar{action-if-found}, 
@ovar{action-if-not-found}, @ovar{includes})
address@hidden AC_CHECK_TYPE (@var{type}, @ovar{action-if-found}, 
@ovar{action-if-not-found}, @dvar{includes, default-includes})
 @acindex CHECK_TYPE
 Check whether @var{type} is defined.  It may be a compiler builtin type
-or defined by the @ovar{includes} (@pxref{Default Includes}).
+or defined by the @var{includes} (@pxref{Default Includes}).
 @end defmac
 
 
address@hidden AC_CHECK_TYPES (@var{types}, @ovar{action-if-found}, 
@ovar{action-if-not-found}, @ovar{includes})
address@hidden AC_CHECK_TYPES (@var{types}, @ovar{action-if-found}, 
@ovar{action-if-not-found}, @dvar{includes, default-includes})
 @acindex CHECK_TYPES
 For each @var{type} of the @var{types} that is defined, define
 @address@hidden (in all capitals).  If no @var{includes} are
@@ -4594,7 +4594,7 @@ @node Compilers and Preprocessors
 @node Generic Compiler Characteristics
 @subsection Generic Compiler Characteristics
 
address@hidden AC_CHECK_SIZEOF (@var{type}, @ovar{unused}, @ovar{includes})
address@hidden AC_CHECK_SIZEOF (@var{type}, @ovar{unused}, @dvar{includes, 
default-includes})
 @acindex CHECK_SIZEOF
 Define @address@hidden (@pxref{Standard Symbols}) to be the
 size in bytes of @var{type}.  If @samp{type} is unknown, it gets a size
@@ -11559,7 +11559,7 @@ subshell.  It accepts a single argument,
 expansion.  The contents ought to end with an end of line.
 @end defmac
 
address@hidden AT_CHECK (@var{commands}, @dvar{status, 0}, @ovar{stdout}, 
@ovar{stderr})
address@hidden AT_CHECK (@var{commands}, @dvar{status, @samp{0}}, 
@ovar{stdout}, @ovar{stderr})
 @atindex CHECK
 Execute a test by performing given shell @var{commands}.  These commands
 should normally exit with @var{status}, while producing expected
Index: lib/autoconf/general.m4
--- lib/autoconf/general.m4 Tue, 09 Oct 2001 21:25:03 +0200 akim
+++ lib/autoconf/general.m4 Tue, 09 Oct 2001 21:32:45 +0200 akim
@@ -1993,81 +1993,6 @@ AC_DEFUN([AC_RUN_LOG],
              [echo "$as_me:$LINENO: AS_ESCAPE([$1])"])])
 
 
-## ------------------ ##
-## Default includes.  ##
-## ------------------ ##
-
-# Always use the same set of default headers for all the generic
-# macros.  It is easier to document, to extend, and to understand than
-# having specific defaults for each macro.
-
-# _AC_INCLUDES_DEFAULT_REQUIREMENTS
-# ---------------------------------
-# Required when AC_INCLUDES_DEFAULT uses its default branch.
-AC_DEFUN([_AC_INCLUDES_DEFAULT_REQUIREMENTS],
-[m4_divert_text([DEFAULTS],
-[# Factoring default headers for most tests.
-dnl If ever you change this variable, please keep autoconf.texi in sync.
-ac_includes_default="\
-#include <stdio.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#if STDC_HEADERS
-# include <stdlib.h>
-# include <stddef.h>
-#else
-# if HAVE_STDLIB_H
-#  include <stdlib.h>
-# endif
-#endif
-#if HAVE_STRING_H
-# if !STDC_HEADERS && HAVE_MEMORY_H
-#  include <memory.h>
-# endif
-# include <string.h>
-#endif
-#if HAVE_STRINGS_H
-# include <strings.h>
-#endif
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif"
-])dnl
-AC_REQUIRE([AC_HEADER_STDC])dnl
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-AC_CHECK_HEADERS([sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-                  inttypes.h stdint.h unistd.h],
-                 [], [], $ac_includes_default)
-])# _AC_INCLUDES_DEFAULT_REQUIREMENTS
-
-
-# AC_INCLUDES_DEFAULT([INCLUDES])
-# -------------------------------
-# If INCLUDES is empty, expand in default includes, otherwise in
-# INCLUDES.
-# In most cases INCLUDES is not double quoted as it should, and if
-# for instance INCLUDES = `#include <stdio.h>' then unless we force
-# a newline, the hash will swallow the closing paren etc. etc.
-# The usual failure.
-# Take no risk: for the newline.
-AC_DEFUN([AC_INCLUDES_DEFAULT],
-[m4_ifval([$1], [$1
-],
-          [AC_REQUIRE([_AC_INCLUDES_DEFAULT_REQUIREMENTS])dnl
-$ac_includes_default])])
-
-
 
 
 ## ------------------------ ##
@@ -2355,7 +2280,7 @@ AC_DEFUN([AC_CHECK_FILES],
 
 # AC_CHECK_DECL(SYMBOL,
 #               [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
-#               [INCLUDES])
+#               [INCLUDES = DEFAULT-INCLUDES])
 # -------------------------------------------------------
 # Check if SYMBOL (a variable or a function) is declared.
 AC_DEFUN([AC_CHECK_DECL],
@@ -2375,7 +2300,7 @@ AC_DEFUN([AC_CHECK_DECL],
 
 # AC_CHECK_DECLS(SYMBOLS,
 #                [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
-#                [INCLUDES])
+#                [INCLUDES = DEFAULT-INCLUDES])
 # --------------------------------------------------------
 # Defines HAVE_DECL_SYMBOL to 1 if declared, 0 otherwise.  See the
 # documentation for a detailed explanation of this difference with
@@ -2442,7 +2367,7 @@ m4_define([AC_LIBOBJ],
 
 
 # _AC_COMPUTE_INT_COMPILE(EXPRESSION, VARIABLE, [INCLUDES], [IF-FAILS])
-# ---------------------------------------------------------
+# ---------------------------------------------------------------------
 # Compute the integer EXPRESSION and store the result in the VARIABLE.
 # Works OK if cross compiling, but assumes twos-complement arithmetic.
 m4_define([_AC_COMPUTE_INT_COMPILE],
Index: lib/autoconf/headers.m4
--- lib/autoconf/headers.m4 Tue, 09 Oct 2001 21:25:03 +0200 akim
+++ lib/autoconf/headers.m4 Tue, 09 Oct 2001 21:27:36 +0200 akim
@@ -53,7 +53,8 @@
 # Table of contents
 #
 # 1. Generic tests for headers
-# 2. Tests for specific headers
+# 2. Default includes
+# 3. Tests for specific headers
 
 
 ## ------------------------------ ##
@@ -195,8 +196,86 @@ AC_DEFUN([AC_CHECK_HEADERS],
 
 
 
+## --------------------- ##
+## 2. Default includes.  ##
+## --------------------- ##
+
+# Always use the same set of default headers for all the generic
+# macros.  It is easier to document, to extend, and to understand than
+# having specific defaults for each macro.
+
+# _AC_INCLUDES_DEFAULT_REQUIREMENTS
+# ---------------------------------
+# Required when AC_INCLUDES_DEFAULT uses its default branch.
+AC_DEFUN([_AC_INCLUDES_DEFAULT_REQUIREMENTS],
+[m4_divert_text([DEFAULTS],
+[# Factoring default headers for most tests.
+dnl If ever you change this variable, please keep autoconf.texi in sync.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+])dnl
+AC_REQUIRE([AC_HEADER_STDC])dnl
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+AC_CHECK_HEADERS([sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+                  inttypes.h stdint.h unistd.h],
+                 [], [], $ac_includes_default)
+])# _AC_INCLUDES_DEFAULT_REQUIREMENTS
+
+
+# AC_INCLUDES_DEFAULT([INCLUDES])
+# -------------------------------
+# If INCLUDES is empty, expand in default includes, otherwise in
+# INCLUDES.
+# In most cases INCLUDES is not double quoted as it should, and if
+# for instance INCLUDES = `#include <stdio.h>' then unless we force
+# a newline, the hash will swallow the closing paren etc. etc.
+# The usual failure.
+# Take no risk: for the newline.
+AC_DEFUN([AC_INCLUDES_DEFAULT],
+[m4_ifval([$1], [$1
+],
+          [AC_REQUIRE([_AC_INCLUDES_DEFAULT_REQUIREMENTS])dnl
+$ac_includes_default])])
+
+
+
+
+
 ## ------------------------------- ##
-## 2. Tests for specific headers.  ##
+## 3. Tests for specific headers.  ##
 ## ------------------------------- ##
 
 
Index: lib/autoconf/types.m4
--- lib/autoconf/types.m4 Tue, 09 Oct 2001 21:25:03 +0200 akim
+++ lib/autoconf/types.m4 Tue, 09 Oct 2001 21:30:35 +0200 akim
@@ -78,7 +78,7 @@
 
 # _AC_CHECK_TYPE_NEW(TYPE,
 #                   [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
-#                   [INCLUDES])
+#                   [INCLUDES = DEFAULT-INCLUDES])
 # ------------------------------------------------------------
 # Check whether the type TYPE is supported by the system, maybe via the
 # the provided includes.  This macro implements the former task of
@@ -157,7 +157,7 @@ m4_define([_AC_CHECK_TYPE_NEW],
 
 # AC_CHECK_TYPES(TYPES,
 #                [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
-#                [INCLUDES])
+#                [INCLUDES = DEFAULT-INCLUDES])
 # --------------------------------------------------------
 # TYPES is an m4 list.  There are no ambiguities here, we mean the newer
 # AC_CHECK_TYPE.
@@ -212,7 +212,7 @@ m4_define([_AC_CHECK_TYPE_MAYBE_TYPE_P],
 #  or
 # AC_CHECK_TYPE(TYPE,
 #              [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
-#              [INCLUDES])
+#              [INCLUDES = DEFAULT-INCLUDES])
 # -------------------------------------------------------
 #
 # Dispatch respectively to _AC_CHECK_TYPE_OLD or _AC_CHECK_TYPE_NEW.
@@ -344,8 +344,8 @@ AC_DEFUN([AC_TYPE_SIGNAL],
 # ---------------- #
 
 
-# AC_CHECK_SIZEOF(TYPE, [IGNORED], [INCLUDES])
-# --------------------------------------------
+# AC_CHECK_SIZEOF(TYPE, [IGNORED], [INCLUDES = DEFAULT-INCLUDES])
+# ---------------------------------------------------------------
 AC_DEFUN([AC_CHECK_SIZEOF],
 [AS_LITERAL_IF([$1], [],
                [AC_FATAL([$0: requires literal arguments])])dnl



reply via email to

[Prev in Thread] Current Thread [Next in Thread]