@end macro
@end ifclear
+@c @hdrindex{MACRO}
+@c ---------------
+@c Indexing a header.
+@macro hdrindex{macro}
+@prindex @file{\macro\}
+@c
+@end macro
+
@c @msindex{MACRO}
@c ---------------
@c Registering an m4_\MACRO\.
@ovindex ALLOCA
@c @fuindex alloca
@prindex @code{alloca}
+@hdrindex alloca.h
Check how to get @code{alloca}. Tries to get a builtin version by
checking for @file{alloca.h} or the predefined C preprocessor macros
@code{__GNUC__} and @code{_AIX}. If this macro finds @file{alloca.h},
@prindex @code{fork}
@c @fuindex vfork
@prindex @code{vfork}
+@hdrindex vfork.h
This macro checks for the @code{fork} and @code{vfork} functions. If a
working @code{fork} is found, define @code{HAVE_WORKING_FORK}. This macro
checks whether @code{fork} is just a stub by trying to run it.
those systems.
@item
+@hdrindex nlist.h
If @file{nlist.h} is found, define @code{HAVE_NLIST_H}.
@item
@acindex{REPLACE_FNMATCH}
@c @fuindex fnmatch
@prindex @code{fnmatch}
+@hdrindex fnmatch.h
If the @code{fnmatch} function does not conform to @acronym{POSIX} (see
@code{AC_FUNC_FNMATCH}), ask for its @code{AC_LIBOBJ} replacement.
@table @asis
@item @file{inttypes.h} vs.@: @file{stdint.h}
+@hdrindex inttypes.h
+@hdrindex stdint.h
Paul Eggert notes that: ISO C 1999 says that @file{inttypes.h} includes
@file{stdint.h}, so there's no need to include @file{stdint.h}
separately in a standard environment. Many implementations have
@file{stdint.h}; @file{stdint.h} seems to be a creation of the committee.
@item @file{linux/irda.h}
+@hdrindex linux/irda.h
It requires @file{linux/types.h} and @file{sys/socket.h}.
@item @file{net/if.h}
+@hdrindex net/if.h
On Darwin, this file requires that @file{sys/socket.h} be included
beforehand. One should run:
See above, item @file{inttypes.h} vs.@: @file{stdint.h}.
@item @file{stdlib.h}
+@hdrindex stdlib.h
On many systems (e.g., Darwin), @file{stdio.h} is a prerequisite.
@item @file{sys/socket.h}
+@hdrindex sys/socket.h
On Darwin, @file{stdlib.h} is a prerequisite.
@item @file{sys/ucred.h}
+@hdrindex sys/ucred.h
On HP Tru64 5.1, @file{sys/types.h} is a prerequisite.
@item @file{X11/extensions/scrnsaver.h}
+@hdrindex X11/extensions/scrnsaver.h
Using XFree86, this header requires @file{X11/Xlib.h}, which is probably
so required that you might not even consider looking for it.
@cvindex HAVE_NDIR_H
@cvindex HAVE_SYS_DIR_H
@cvindex HAVE_SYS_NDIR_H
+@hdrindex dirent.h
+@hdrindex sys/ndir.h
+@hdrindex sys/dir.h
+@hdrindex ndir.h
Check for the following header files. For the first one that is
found and defines @samp{DIR}, define the listed C preprocessor macro:
@acindex{HEADER_MAJOR}
@cvindex MAJOR_IN_MKDEV
@cvindex MAJOR_IN_SYSMACROS
+@hdrindex sys/mkdev.h
+@hdrindex sys/sysmacros.h
If @file{sys/types.h} does not define @code{major}, @code{minor}, and
@code{makedev}, but @file{sys/mkdev.h} does, define
@code{MAJOR_IN_MKDEV}; otherwise, if @file{sys/sysmacros.h} does, define
@defmac AC_HEADER_STAT
@acindex{HEADER_STAT}
@acindex{STAT_MACROS_BROKEN}
+@hdrindex sys/stat.h
If the macros @code{S_ISDIR}, @code{S_ISREG}, etc.@: defined in
@file{sys/stat.h} do not work properly (returning false positives),
define @code{STAT_MACROS_BROKEN}. This is the case on Tektronix UTekV,
@acindex{HEADER_STDBOOL}
@cvindex HAVE_STDBOOL_H
@cvindex HAVE__BOOL
+@hdrindex stdbool.h
+@hdrindex system.h
If @file{stdbool.h} exists and is conformant to C99, define
@code{HAVE_STDBOOL_H} to 1; if the type @code{_Bool} is defined, define
@code{HAVE__BOOL} to 1. To fulfill the C99 requirements, your
@defmac AC_HEADER_STDC
@acindex{HEADER_STDC}
@cvindex STDC_HEADERS
+@hdrindex stdlib.h
+@hdrindex stdarg.h
+@hdrindex string.h
+@hdrindex float.h
+@hdrindex ctype.h
Define @code{STDC_HEADERS} if the system has @acronym{ANSI} C header files.
Specifically, this macro checks for @file{stdlib.h}, @file{stdarg.h},
@file{string.h}, and @file{float.h}; if the system has those, it
functions) because many systems that have GCC do not have @acronym{ANSI} C
header files.
+@hdrindex string.h
+@hdrindex strings.h
On systems without @acronym{ANSI} C headers, there is so much variation
that it is probably easier to declare the functions you use than to
figure out exactly what the system header files declare. Some systems
@defmac AC_HEADER_SYS_WAIT
@acindex{HEADER_SYS_WAIT}
@cvindex HAVE_SYS_WAIT_H
+@hdrindex sys/wait.h
If @file{sys/wait.h} exists and is compatible with @acronym{POSIX}, define
@code{HAVE_SYS_WAIT_H}. Incompatibility can occur if @file{sys/wait.h}
does not exist, or if it uses the old @acronym{BSD} @code{union wait} instead
@end defmac
@cvindex _POSIX_VERSION
+@hdrindex unistd.h
@code{_POSIX_VERSION} is defined when @file{unistd.h} is included on
@acronym{POSIX} systems. If there is no @file{unistd.h}, it is definitely
not a @acronym{POSIX} system. However, some non-@acronym{POSIX} systems do
@defmac AC_HEADER_TIME
@acindex{HEADER_TIME}
@cvindex TIME_WITH_SYS_TIME
+@hdrindex time.h
+@hdrindex sys/time.h
If a program may include both @file{time.h} and @file{sys/time.h},
define @code{TIME_WITH_SYS_TIME}. On some older systems,
@file{sys/time.h} includes @file{time.h}, but @file{time.h} is not
@defmac AC_HEADER_TIOCGWINSZ
@acindex{HEADER_TIOCGWINSZ}
@cvindex GWINSZ_IN_SYS_IOCTL
+@hdrindex sys/ioctl.h
+@hdrindex termios.h
@c FIXME: I need clarifications from Jim.
If the use of @code{TIOCGWINSZ} requires @file{<sys/ioctl.h>}, then
define @code{GWINSZ_IN_SYS_IOCTL}. Otherwise @code{TIOCGWINSZ} can be
@defmac AC_STRUCT_TM
@acindex{STRUCT_TM}
@cvindex TM_IN_SYS_TIME
+@hdrindex time.h
+@hdrindex sys/time.h
If @file{time.h} does not define @code{struct tm}, define
@code{TM_IN_SYS_TIME}, which means that including @file{sys/time.h}
had better define @code{struct tm}.
@node Particular Types
@subsection Particular Type Checks
+@hdrindex sys/types.h
+@hdrindex stdlib.h
These macros check for particular C types in @file{sys/types.h},
@file{stdlib.h} and others, if they exist.
@defmac AC_TYPE_MBSTATE_T
@acindex{TYPE_MBSTATE_T}
@cvindex mbstate_t
+@hdrindex wchar.h
Define @code{HAVE_MBSTATE_T} if @code{<wchar.h>} declares the
@code{mbstate_t} type. Also, define @code{mbstate_t} to be a type if
@code{<wchar.h>} does not declare it.
@defmac AC_TYPE_SIGNAL
@acindex{TYPE_SIGNAL}
@cvindex RETSIGTYPE
+@hdrindex signal.h
If @file{signal.h} declares @code{signal} as returning a pointer to a
function returning @code{void}, define @code{RETSIGTYPE} to be
@code{void}; otherwise, define it to be @code{int}.