135 |
@end macro |
@end macro |
136 |
@end ifclear |
@end ifclear |
137 |
|
|
138 |
|
@c @hdrindex{MACRO} |
139 |
|
@c --------------- |
140 |
|
@c Indexing a header. |
141 |
|
@macro hdrindex{macro} |
142 |
|
@prindex @file{\macro\} |
143 |
|
@c |
144 |
|
@end macro |
145 |
|
|
146 |
@c @msindex{MACRO} |
@c @msindex{MACRO} |
147 |
@c --------------- |
@c --------------- |
148 |
@c Registering an m4_\MACRO\. |
@c Registering an m4_\MACRO\. |
3622 |
@ovindex ALLOCA |
@ovindex ALLOCA |
3623 |
@c @fuindex alloca |
@c @fuindex alloca |
3624 |
@prindex @code{alloca} |
@prindex @code{alloca} |
3625 |
|
@hdrindex alloca.h |
3626 |
Check how to get @code{alloca}. Tries to get a builtin version by |
Check how to get @code{alloca}. Tries to get a builtin version by |
3627 |
checking for @file{alloca.h} or the predefined C preprocessor macros |
checking for @file{alloca.h} or the predefined C preprocessor macros |
3628 |
@code{__GNUC__} and @code{_AIX}. If this macro finds @file{alloca.h}, |
@code{__GNUC__} and @code{_AIX}. If this macro finds @file{alloca.h}, |
3732 |
@prindex @code{fork} |
@prindex @code{fork} |
3733 |
@c @fuindex vfork |
@c @fuindex vfork |
3734 |
@prindex @code{vfork} |
@prindex @code{vfork} |
3735 |
|
@hdrindex vfork.h |
3736 |
This macro checks for the @code{fork} and @code{vfork} functions. If a |
This macro checks for the @code{fork} and @code{vfork} functions. If a |
3737 |
working @code{fork} is found, define @code{HAVE_WORKING_FORK}. This macro |
working @code{fork} is found, define @code{HAVE_WORKING_FORK}. This macro |
3738 |
checks whether @code{fork} is just a stub by trying to run it. |
checks whether @code{fork} is just a stub by trying to run it. |
3818 |
those systems. |
those systems. |
3819 |
|
|
3820 |
@item |
@item |
3821 |
|
@hdrindex nlist.h |
3822 |
If @file{nlist.h} is found, define @code{HAVE_NLIST_H}. |
If @file{nlist.h} is found, define @code{HAVE_NLIST_H}. |
3823 |
|
|
3824 |
@item |
@item |
4133 |
@acindex{REPLACE_FNMATCH} |
@acindex{REPLACE_FNMATCH} |
4134 |
@c @fuindex fnmatch |
@c @fuindex fnmatch |
4135 |
@prindex @code{fnmatch} |
@prindex @code{fnmatch} |
4136 |
|
@hdrindex fnmatch.h |
4137 |
If the @code{fnmatch} function does not conform to @acronym{POSIX} (see |
If the @code{fnmatch} function does not conform to @acronym{POSIX} (see |
4138 |
@code{AC_FUNC_FNMATCH}), ask for its @code{AC_LIBOBJ} replacement. |
@code{AC_FUNC_FNMATCH}), ask for its @code{AC_LIBOBJ} replacement. |
4139 |
|
|
4295 |
|
|
4296 |
@table @asis |
@table @asis |
4297 |
@item @file{inttypes.h} vs.@: @file{stdint.h} |
@item @file{inttypes.h} vs.@: @file{stdint.h} |
4298 |
|
@hdrindex inttypes.h |
4299 |
|
@hdrindex stdint.h |
4300 |
Paul Eggert notes that: ISO C 1999 says that @file{inttypes.h} includes |
Paul Eggert notes that: ISO C 1999 says that @file{inttypes.h} includes |
4301 |
@file{stdint.h}, so there's no need to include @file{stdint.h} |
@file{stdint.h}, so there's no need to include @file{stdint.h} |
4302 |
separately in a standard environment. Many implementations have |
separately in a standard environment. Many implementations have |
4306 |
@file{stdint.h}; @file{stdint.h} seems to be a creation of the committee. |
@file{stdint.h}; @file{stdint.h} seems to be a creation of the committee. |
4307 |
|
|
4308 |
@item @file{linux/irda.h} |
@item @file{linux/irda.h} |
4309 |
|
@hdrindex linux/irda.h |
4310 |
It requires @file{linux/types.h} and @file{sys/socket.h}. |
It requires @file{linux/types.h} and @file{sys/socket.h}. |
4311 |
|
|
4312 |
@item @file{net/if.h} |
@item @file{net/if.h} |
4313 |
|
@hdrindex net/if.h |
4314 |
On Darwin, this file requires that @file{sys/socket.h} be included |
On Darwin, this file requires that @file{sys/socket.h} be included |
4315 |
beforehand. One should run: |
beforehand. One should run: |
4316 |
|
|
4336 |
See above, item @file{inttypes.h} vs.@: @file{stdint.h}. |
See above, item @file{inttypes.h} vs.@: @file{stdint.h}. |
4337 |
|
|
4338 |
@item @file{stdlib.h} |
@item @file{stdlib.h} |
4339 |
|
@hdrindex stdlib.h |
4340 |
On many systems (e.g., Darwin), @file{stdio.h} is a prerequisite. |
On many systems (e.g., Darwin), @file{stdio.h} is a prerequisite. |
4341 |
|
|
4342 |
@item @file{sys/socket.h} |
@item @file{sys/socket.h} |
4343 |
|
@hdrindex sys/socket.h |
4344 |
On Darwin, @file{stdlib.h} is a prerequisite. |
On Darwin, @file{stdlib.h} is a prerequisite. |
4345 |
|
|
4346 |
@item @file{sys/ucred.h} |
@item @file{sys/ucred.h} |
4347 |
|
@hdrindex sys/ucred.h |
4348 |
On HP Tru64 5.1, @file{sys/types.h} is a prerequisite. |
On HP Tru64 5.1, @file{sys/types.h} is a prerequisite. |
4349 |
|
|
4350 |
@item @file{X11/extensions/scrnsaver.h} |
@item @file{X11/extensions/scrnsaver.h} |
4351 |
|
@hdrindex X11/extensions/scrnsaver.h |
4352 |
Using XFree86, this header requires @file{X11/Xlib.h}, which is probably |
Using XFree86, this header requires @file{X11/Xlib.h}, which is probably |
4353 |
so required that you might not even consider looking for it. |
so required that you might not even consider looking for it. |
4354 |
|
|
4372 |
@cvindex HAVE_NDIR_H |
@cvindex HAVE_NDIR_H |
4373 |
@cvindex HAVE_SYS_DIR_H |
@cvindex HAVE_SYS_DIR_H |
4374 |
@cvindex HAVE_SYS_NDIR_H |
@cvindex HAVE_SYS_NDIR_H |
4375 |
|
@hdrindex dirent.h |
4376 |
|
@hdrindex sys/ndir.h |
4377 |
|
@hdrindex sys/dir.h |
4378 |
|
@hdrindex ndir.h |
4379 |
Check for the following header files. For the first one that is |
Check for the following header files. For the first one that is |
4380 |
found and defines @samp{DIR}, define the listed C preprocessor macro: |
found and defines @samp{DIR}, define the listed C preprocessor macro: |
4381 |
|
|
4422 |
@acindex{HEADER_MAJOR} |
@acindex{HEADER_MAJOR} |
4423 |
@cvindex MAJOR_IN_MKDEV |
@cvindex MAJOR_IN_MKDEV |
4424 |
@cvindex MAJOR_IN_SYSMACROS |
@cvindex MAJOR_IN_SYSMACROS |
4425 |
|
@hdrindex sys/mkdev.h |
4426 |
|
@hdrindex sys/sysmacros.h |
4427 |
If @file{sys/types.h} does not define @code{major}, @code{minor}, and |
If @file{sys/types.h} does not define @code{major}, @code{minor}, and |
4428 |
@code{makedev}, but @file{sys/mkdev.h} does, define |
@code{makedev}, but @file{sys/mkdev.h} does, define |
4429 |
@code{MAJOR_IN_MKDEV}; otherwise, if @file{sys/sysmacros.h} does, define |
@code{MAJOR_IN_MKDEV}; otherwise, if @file{sys/sysmacros.h} does, define |
4434 |
@defmac AC_HEADER_STAT |
@defmac AC_HEADER_STAT |
4435 |
@acindex{HEADER_STAT} |
@acindex{HEADER_STAT} |
4436 |
@acindex{STAT_MACROS_BROKEN} |
@acindex{STAT_MACROS_BROKEN} |
4437 |
|
@hdrindex sys/stat.h |
4438 |
If the macros @code{S_ISDIR}, @code{S_ISREG}, etc.@: defined in |
If the macros @code{S_ISDIR}, @code{S_ISREG}, etc.@: defined in |
4439 |
@file{sys/stat.h} do not work properly (returning false positives), |
@file{sys/stat.h} do not work properly (returning false positives), |
4440 |
define @code{STAT_MACROS_BROKEN}. This is the case on Tektronix UTekV, |
define @code{STAT_MACROS_BROKEN}. This is the case on Tektronix UTekV, |
4445 |
@acindex{HEADER_STDBOOL} |
@acindex{HEADER_STDBOOL} |
4446 |
@cvindex HAVE_STDBOOL_H |
@cvindex HAVE_STDBOOL_H |
4447 |
@cvindex HAVE__BOOL |
@cvindex HAVE__BOOL |
4448 |
|
@hdrindex stdbool.h |
4449 |
|
@hdrindex system.h |
4450 |
If @file{stdbool.h} exists and is conformant to C99, define |
If @file{stdbool.h} exists and is conformant to C99, define |
4451 |
@code{HAVE_STDBOOL_H} to 1; if the type @code{_Bool} is defined, define |
@code{HAVE_STDBOOL_H} to 1; if the type @code{_Bool} is defined, define |
4452 |
@code{HAVE__BOOL} to 1. To fulfill the C99 requirements, your |
@code{HAVE__BOOL} to 1. To fulfill the C99 requirements, your |
4475 |
@defmac AC_HEADER_STDC |
@defmac AC_HEADER_STDC |
4476 |
@acindex{HEADER_STDC} |
@acindex{HEADER_STDC} |
4477 |
@cvindex STDC_HEADERS |
@cvindex STDC_HEADERS |
4478 |
|
@hdrindex stdlib.h |
4479 |
|
@hdrindex stdarg.h |
4480 |
|
@hdrindex string.h |
4481 |
|
@hdrindex float.h |
4482 |
|
@hdrindex ctype.h |
4483 |
Define @code{STDC_HEADERS} if the system has @acronym{ANSI} C header files. |
Define @code{STDC_HEADERS} if the system has @acronym{ANSI} C header files. |
4484 |
Specifically, this macro checks for @file{stdlib.h}, @file{stdarg.h}, |
Specifically, this macro checks for @file{stdlib.h}, @file{stdarg.h}, |
4485 |
@file{string.h}, and @file{float.h}; if the system has those, it |
@file{string.h}, and @file{float.h}; if the system has those, it |
4495 |
functions) because many systems that have GCC do not have @acronym{ANSI} C |
functions) because many systems that have GCC do not have @acronym{ANSI} C |
4496 |
header files. |
header files. |
4497 |
|
|
4498 |
|
@hdrindex string.h |
4499 |
|
@hdrindex strings.h |
4500 |
On systems without @acronym{ANSI} C headers, there is so much variation |
On systems without @acronym{ANSI} C headers, there is so much variation |
4501 |
that it is probably easier to declare the functions you use than to |
that it is probably easier to declare the functions you use than to |
4502 |
figure out exactly what the system header files declare. Some systems |
figure out exactly what the system header files declare. Some systems |
4549 |
@defmac AC_HEADER_SYS_WAIT |
@defmac AC_HEADER_SYS_WAIT |
4550 |
@acindex{HEADER_SYS_WAIT} |
@acindex{HEADER_SYS_WAIT} |
4551 |
@cvindex HAVE_SYS_WAIT_H |
@cvindex HAVE_SYS_WAIT_H |
4552 |
|
@hdrindex sys/wait.h |
4553 |
If @file{sys/wait.h} exists and is compatible with @acronym{POSIX}, define |
If @file{sys/wait.h} exists and is compatible with @acronym{POSIX}, define |
4554 |
@code{HAVE_SYS_WAIT_H}. Incompatibility can occur if @file{sys/wait.h} |
@code{HAVE_SYS_WAIT_H}. Incompatibility can occur if @file{sys/wait.h} |
4555 |
does not exist, or if it uses the old @acronym{BSD} @code{union wait} instead |
does not exist, or if it uses the old @acronym{BSD} @code{union wait} instead |
4575 |
@end defmac |
@end defmac |
4576 |
|
|
4577 |
@cvindex _POSIX_VERSION |
@cvindex _POSIX_VERSION |
4578 |
|
@hdrindex unistd.h |
4579 |
@code{_POSIX_VERSION} is defined when @file{unistd.h} is included on |
@code{_POSIX_VERSION} is defined when @file{unistd.h} is included on |
4580 |
@acronym{POSIX} systems. If there is no @file{unistd.h}, it is definitely |
@acronym{POSIX} systems. If there is no @file{unistd.h}, it is definitely |
4581 |
not a @acronym{POSIX} system. However, some non-@acronym{POSIX} systems do |
not a @acronym{POSIX} system. However, some non-@acronym{POSIX} systems do |
4599 |
@defmac AC_HEADER_TIME |
@defmac AC_HEADER_TIME |
4600 |
@acindex{HEADER_TIME} |
@acindex{HEADER_TIME} |
4601 |
@cvindex TIME_WITH_SYS_TIME |
@cvindex TIME_WITH_SYS_TIME |
4602 |
|
@hdrindex time.h |
4603 |
|
@hdrindex sys/time.h |
4604 |
If a program may include both @file{time.h} and @file{sys/time.h}, |
If a program may include both @file{time.h} and @file{sys/time.h}, |
4605 |
define @code{TIME_WITH_SYS_TIME}. On some older systems, |
define @code{TIME_WITH_SYS_TIME}. On some older systems, |
4606 |
@file{sys/time.h} includes @file{time.h}, but @file{time.h} is not |
@file{sys/time.h} includes @file{time.h}, but @file{time.h} is not |
4631 |
@defmac AC_HEADER_TIOCGWINSZ |
@defmac AC_HEADER_TIOCGWINSZ |
4632 |
@acindex{HEADER_TIOCGWINSZ} |
@acindex{HEADER_TIOCGWINSZ} |
4633 |
@cvindex GWINSZ_IN_SYS_IOCTL |
@cvindex GWINSZ_IN_SYS_IOCTL |
4634 |
|
@hdrindex sys/ioctl.h |
4635 |
|
@hdrindex termios.h |
4636 |
@c FIXME: I need clarifications from Jim. |
@c FIXME: I need clarifications from Jim. |
4637 |
If the use of @code{TIOCGWINSZ} requires @file{<sys/ioctl.h>}, then |
If the use of @code{TIOCGWINSZ} requires @file{<sys/ioctl.h>}, then |
4638 |
define @code{GWINSZ_IN_SYS_IOCTL}. Otherwise @code{TIOCGWINSZ} can be |
define @code{GWINSZ_IN_SYS_IOCTL}. Otherwise @code{TIOCGWINSZ} can be |
4861 |
@defmac AC_STRUCT_TM |
@defmac AC_STRUCT_TM |
4862 |
@acindex{STRUCT_TM} |
@acindex{STRUCT_TM} |
4863 |
@cvindex TM_IN_SYS_TIME |
@cvindex TM_IN_SYS_TIME |
4864 |
|
@hdrindex time.h |
4865 |
|
@hdrindex sys/time.h |
4866 |
If @file{time.h} does not define @code{struct tm}, define |
If @file{time.h} does not define @code{struct tm}, define |
4867 |
@code{TM_IN_SYS_TIME}, which means that including @file{sys/time.h} |
@code{TM_IN_SYS_TIME}, which means that including @file{sys/time.h} |
4868 |
had better define @code{struct tm}. |
had better define @code{struct tm}. |
4933 |
@node Particular Types |
@node Particular Types |
4934 |
@subsection Particular Type Checks |
@subsection Particular Type Checks |
4935 |
|
|
4936 |
|
@hdrindex sys/types.h |
4937 |
|
@hdrindex stdlib.h |
4938 |
These macros check for particular C types in @file{sys/types.h}, |
These macros check for particular C types in @file{sys/types.h}, |
4939 |
@file{stdlib.h} and others, if they exist. |
@file{stdlib.h} and others, if they exist. |
4940 |
|
|
4948 |
@defmac AC_TYPE_MBSTATE_T |
@defmac AC_TYPE_MBSTATE_T |
4949 |
@acindex{TYPE_MBSTATE_T} |
@acindex{TYPE_MBSTATE_T} |
4950 |
@cvindex mbstate_t |
@cvindex mbstate_t |
4951 |
|
@hdrindex wchar.h |
4952 |
Define @code{HAVE_MBSTATE_T} if @code{<wchar.h>} declares the |
Define @code{HAVE_MBSTATE_T} if @code{<wchar.h>} declares the |
4953 |
@code{mbstate_t} type. Also, define @code{mbstate_t} to be a type if |
@code{mbstate_t} type. Also, define @code{mbstate_t} to be a type if |
4954 |
@code{<wchar.h>} does not declare it. |
@code{<wchar.h>} does not declare it. |
4975 |
@defmac AC_TYPE_SIGNAL |
@defmac AC_TYPE_SIGNAL |
4976 |
@acindex{TYPE_SIGNAL} |
@acindex{TYPE_SIGNAL} |
4977 |
@cvindex RETSIGTYPE |
@cvindex RETSIGTYPE |
4978 |
|
@hdrindex signal.h |
4979 |
If @file{signal.h} declares @code{signal} as returning a pointer to a |
If @file{signal.h} declares @code{signal} as returning a pointer to a |
4980 |
function returning @code{void}, define @code{RETSIGTYPE} to be |
function returning @code{void}, define @code{RETSIGTYPE} to be |
4981 |
@code{void}; otherwise, define it to be @code{int}. |
@code{void}; otherwise, define it to be @code{int}. |