(autoconf.info)Particular Functions
4.3.1 Particular Function Checks
--------------------------------
These macros check for particular C functions--whether they exist, and
in some cases how they respond when given certain arguments.
-- Macro: AC_FUNC_ALLOCA
Check how to get 'alloca'. Tries to get a builtin version by
checking for 'alloca.h' or the predefined C preprocessor macros
'__GNUC__' and '_AIX'. If this macro finds 'alloca.h', it defines
'HAVE_ALLOCA_H'.
If those attempts fail, it looks for the function in the standard C
library. If any of those methods succeed, it defines
'HAVE_ALLOCA'. Otherwise, it sets the output variable 'ALLOCA' to
'alloca.o' and defines 'C_ALLOCA' (so programs can periodically
call 'alloca(0)' to garbage collect). This variable is separate
from 'LIBOBJS' so multiple programs can share the value of 'ALLOCA'
without needing to create an actual library, in case only some of
them use the code in 'LIBOBJS'.
This macro does not try to get 'alloca' from the System V R3
'libPW' or the System V R4 'libucb' because those libraries contain
some incompatible functions that cause trouble. Some versions do
not even contain 'alloca' or contain a buggy version. If you still
want to use their 'alloca', use 'ar' to extract 'alloca.o' from
them instead of compiling 'alloca.c'.
Source files that use 'alloca' should start with a piece of code
like the following, to declare it properly. In some versions of
AIX, the declaration of 'alloca' must precede everything else
except for comments and preprocessor directives. The '#pragma'
directive is indented so that pre-ANSI C compilers will ignore it,
rather than choke on it.
/* AIX requires this to be the first thing in the file. */
#ifndef __GNUC__
# if HAVE_ALLOCA_H
# include <alloca.h>
# else
# ifdef _AIX
#pragma alloca
# else
# ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
# endif
# endif
# endif
#endif
-- Macro: AC_FUNC_CLOSEDIR_VOID
If the 'closedir' function does not return a meaningful value,
define 'CLOSEDIR_VOID'. Otherwise, callers ought to check its
return value for an error indicator.
-- Macro: AC_FUNC_FNMATCH
If the 'fnmatch' function is available and works (unlike the one on
SunOS 5.4), define 'HAVE_FNMATCH'.
-- Macro: AC_FUNC_GETLOADAVG
Check how to get the system load averages. If the system has the
'getloadavg' function, this macro defines 'HAVE_GETLOADAVG', and
adds to 'LIBS' any libraries needed to get that function.
Otherwise, it adds 'getloadavg.o' to the output variable 'LIBOBJS',
and possibly defines several other C preprocessor macros and output
variables:
1. It defines 'SVR4', 'DGUX', 'UMAX', or 'UMAX4_3' if on those
systems.
2. If it finds 'nlist.h', it defines 'NLIST_STRUCT'.
3. If 'struct nlist' has an 'n_un' member, it defines
'NLIST_NAME_UNION'.
4. If compiling 'getloadavg.c' defines 'LDAV_PRIVILEGED',
programs need to be installed specially on this system for
'getloadavg' to work, and this macro defines
'GETLOADAVG_PRIVILEGED'.
5. This macro sets the output variable 'NEED_SETGID'. The value
is 'true' if special installation is required, 'false' if not.
If 'NEED_SETGID' is 'true', this macro sets 'KMEM_GROUP' to
the name of the group that should own the installed program.
-- Macro: AC_FUNC_GETMNTENT
Check for 'getmntent' in the 'sun', 'seq', and 'gen' libraries, for
Irix 4, PTX, and Unixware, respectively. Then, if 'getmntent' is
available, define 'HAVE_GETMNTENT'.
-- Macro: AC_FUNC_GETPGRP
If 'getpgrp' takes no argument (the POSIX.1 version), define
'GETPGRP_VOID'. Otherwise, it is the BSD version, which takes a
process ID as an argument. This macro does not check whether
'getpgrp' exists at all; if you need to work in that situation,
first call 'AC_CHECK_FUNC' for 'getpgrp'.
-- Macro: AC_FUNC_MEMCMP
If the 'memcmp' function is not available, or does not work on
8-bit data (like the one on SunOS 4.1.3), add 'memcmp.o' to output
variable 'LIBOBJS'.
-- Macro: AC_FUNC_MMAP
If the 'mmap' function exists and works correctly, define
'HAVE_MMAP'. Only checks private fixed mapping of already-mapped
memory.
-- Macro: AC_FUNC_SELECT_ARGTYPES
Determines the correct type to be passed to each of the 'select'
function's arguments, and defines those types in
'SELECT_TYPE_ARG1', 'SELECT_TYPE_ARG234', and 'SELECT_TYPE_ARG5'
respectively. 'SELECT_TYPE_ARG1' defaults to 'int',
'SELECT_TYPE_ARG234' defaults to 'int *', and 'SELECT_TYPE_ARG5'
defaults to 'struct timeval *'.
-- Macro: AC_FUNC_SETPGRP
If 'setpgrp' takes no argument (the POSIX.1 version), define
'SETPGRP_VOID'. Otherwise, it is the BSD version, which takes two
process ID as arguments. This macro does not check whether
'setpgrp' exists at all; if you need to work in that situation,
first call 'AC_CHECK_FUNC' for 'setpgrp'.
-- Macro: AC_FUNC_SETVBUF_REVERSED
If 'setvbuf' takes the buffering type as its second argument and
the buffer pointer as the third, instead of the other way around,
define 'SETVBUF_REVERSED'. This is the case on System V before
release 3.
-- Macro: AC_FUNC_STRCOLL
If the 'strcoll' function exists and works correctly, define
'HAVE_STRCOLL'. This does a bit more than
'AC_CHECK_FUNCS(strcoll)', because some systems have incorrect
definitions of 'strcoll', which should not be used.
-- Macro: AC_FUNC_STRFTIME
Check for 'strftime' in the 'intl' library, for SCO UNIX. Then, if
'strftime' is available, define 'HAVE_STRFTIME'.
-- Macro: AC_FUNC_UTIME_NULL
If 'utime(FILE, NULL)' sets FILE's timestamp to the present, define
'HAVE_UTIME_NULL'.
-- Macro: AC_FUNC_VFORK
If 'vfork.h' is found, define 'HAVE_VFORK_H'. If a working 'vfork'
is not found, define 'vfork' to be 'fork'. This macro checks for
several known errors in implementations of 'vfork' and considers
the system to not have a working 'vfork' if it detects any of them.
It is not considered to be an implementation error if a child's
invocation of 'signal' modifies the parent's signal handler, since
child processes rarely change their signal handlers.
-- Macro: AC_FUNC_VPRINTF
If 'vprintf' is found, define 'HAVE_VPRINTF'. Otherwise, if
'_doprnt' is found, define 'HAVE_DOPRNT'. (If 'vprintf' is
available, you may assume that 'vfprintf' and 'vsprintf' are also
available.)
-- Macro: AC_FUNC_WAIT3
If 'wait3' is found and fills in the contents of its third argument
(a 'struct rusage *'), which HP-UX does not do, define
'HAVE_WAIT3'.
automatically generated by info2www version 1.2.2.9