]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/autoconf/general.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS)
authorAkim Demaille <akim@epita.fr>
Wed, 10 Oct 2001 12:58:44 +0000 (12:58 +0000)
committerAkim Demaille <akim@epita.fr>
Wed, 10 Oct 2001 12:58:44 +0000 (12:58 +0000)
(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.

ChangeLog
doc/autoconf.texi
lib/autoconf/general.m4
lib/autoconf/headers.m4
lib/autoconf/types.m4

index 14c4a6a51c5a208186dc3780fab40965bb695542..3d47ca5f4394ea890e3feed0845bc42eb758e7c1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2001-10-10  Akim Demaille  <akim@epita.fr>
+
+       * 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.
+
 2001-10-09  Akim Demaille  <akim@epita.fr>
 
        * lib/autoconf/autoconf.m4 (m4_patsubst, m4_regexp): New
index 3cf10bceb8efd46602bf3ba96ce5a77212e5f768..d93cfc0c6ae3424d56417251c3c390df1467f018 100644 (file)
@@ -4184,7 +4184,7 @@ These macros are used to find system header files not covered by the
 as well as find out whether it is present, you have to write your own
 test for it (@pxref{Writing Tests}).
 
-@defmac AC_CHECK_HEADER (@var{header-file}, @ovar{action-if-found}, @ovar{action-if-not-found}, @ovar{includes})
+@defmac 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 @@ single space, a comment, to check whether @var{header-file} compiles
 with success.
 @end defmac
 
-@defmac AC_CHECK_HEADERS (@var{header-file}@dots{}, @ovar{action-if-found}, @ovar{action-if-not-found}, @ovar{includes})
+@defmac AC_CHECK_HEADERS (@var{header-file}@dots{}, @ovar{action-if-found}, @ovar{action-if-not-found}, @dvar{includes, default-includes})
 @acindex CHECK_HEADERS
 @cvindex HAVE_@var{header}
 For each given system header file @var{header-file} in the
@@ -4273,7 +4273,7 @@ is declared in a system header file, either @file{signal.h} or
 These macros are used to find declarations not covered by the ``particular''
 test macros.
 
-@defmac AC_CHECK_DECL (@var{symbol}, @ovar{action-if-found}, @ovar{action-if-not-found}, @ovar{includes})
+@defmac 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 @@ r-value, not if it is really declared, because it is much safer to avoid
 introducing extra declarations when they are not needed.
 @end defmac
 
-@defmac AC_CHECK_DECLS (@var{symbols}, @ovar{action-if-found}, @ovar{action-if-not-found}, @ovar{includes})
+@defmac AC_CHECK_DECLS (@var{symbols}, @ovar{action-if-found}, @ovar{action-if-not-found}, @dvar{includes, default-includes})
 @acindex CHECK_DECLS
 @cvindex HAVE_DECL_@var{symbol}
 For each of the @var{symbols} (@emph{comma}-separated list), define
@@ -4417,7 +4417,7 @@ obsoleted @code{HAVE_TM_ZONE}).  Otherwise, if the external array
 These macros are used to find structure members not covered by the
 ``particular'' test macros.
 
-@defmac AC_CHECK_MEMBER (@var{aggregate}.@var{member}, @ovar{action-if-found}, @ovar{action-if-not-found}, @ovar{includes})
+@defmac AC_CHECK_MEMBER (@var{aggregate}.@var{member}, @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 @@ AC_CHECK_MEMBER(struct top.middle.bot)
 @end example
 @end defmac
 
-@defmac AC_CHECK_MEMBERS (@var{members}, @ovar{action-if-found}, @ovar{action-if-not-found}, @ovar{includes})
+@defmac 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 @samp{@var{aggregate}.@var{member}} of
 @var{members} using the previous macro.  When @var{member} belongs to
@@ -4534,14 +4534,14 @@ If @code{uid_t} is not defined, define @code{uid_t} to be @code{int} and
 These macros are used to check for types not covered by the ``particular''
 test macros.
 
-@defmac AC_CHECK_TYPE (@var{type}, @ovar{action-if-found}, @ovar{action-if-not-found}, @ovar{includes})
+@defmac 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
 
 
-@defmac AC_CHECK_TYPES (@var{types}, @ovar{action-if-found}, @ovar{action-if-not-found}, @ovar{includes})
+@defmac 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
 @code{HAVE_@var{type}} (in all capitals).  If no @var{includes} are
@@ -4594,7 +4594,7 @@ compiling.
 @node Generic Compiler Characteristics
 @subsection Generic Compiler Characteristics
 
-@defmac AC_CHECK_SIZEOF (@var{type}, @ovar{unused}, @ovar{includes})
+@defmac AC_CHECK_SIZEOF (@var{type}, @ovar{unused}, @dvar{includes, default-includes})
 @acindex CHECK_SIZEOF
 Define @code{SIZEOF_@var{type}} (@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 @@ brackets to protect against included commas or spurious @code{m4}
 expansion.  The contents ought to end with an end of line.
 @end defmac
 
-@defmac AT_CHECK (@var{commands}, @dvar{status, 0}, @ovar{stdout}, @ovar{stderr})
+@defmac 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 29ed92c8f31a8517e388c11ad214d3a3f61e6e1f..7ce22508538c4a75ed1b206df9520933095aaf6c 100644 (file)
@@ -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 @@ $2],
 
 # 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 @@ AS_VAR_POPDEF([ac_Symbol])dnl
 
 # 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 2cd3d708df872ce79e5555d06ee7f6c836dfe235..561d812a49aa53947a710d4adef5f3e47d427034 100644 (file)
@@ -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 @@ done
 
 
 
+## --------------------- ##
+## 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 26b15ac4cffd29888e67e3afc4d10e09b618c44f..426d6d744dc3d62bcd4b13f3fa717bd4bd8aa20c 100644 (file)
@@ -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 @@ AS_VAR_POPDEF([ac_Type])dnl
 
 # 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_DEFINE_UNQUOTED(RETSIGTYPE, $ac_cv_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