Node:Particular Functions, Next:Generic Functions, Previous:Function Portability, Up:Library Functions
These macros check for particular C functions--whether they exist, and in some cases how they respond when given certain arguments.
| AC_FUNC_ALLOCA | Macro | 
| Check how to get alloca.  Tries to get a builtin version by
checking foralloca.hor the predefined C preprocessor macros__GNUC__and_AIX.  If this macro findsalloca.h,
it definesHAVE_ALLOCA_H.If those attempts fail, it looks for the function in the standard C
library.  If any of those methods succeed, it defines
 This macro does not try to get  Source files that use  /* 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 | 
| AC_FUNC_CHOWN | Macro | 
| If the chownfunction is available and works (in particular, it
should accept-1foruidandgid), defineHAVE_CHOWN. | 
| AC_FUNC_CLOSEDIR_VOID | Macro | 
| If the closedirfunction does not return a meaningful value,
defineCLOSEDIR_VOID.  Otherwise, callers ought to check its
return value for an error indicator. | 
| AC_FUNC_ERROR_AT_LINE | Macro | 
| If the error_at_linefunction is not found, require anAC_LIBOBJreplacement oferror. | 
| AC_FUNC_FNMATCH | Macro | 
| If the fnmatchfunction is available and works (unlike the one on
Solaris 2.4), defineHAVE_FNMATCH. | 
| AC_FUNC_FORK | Macro | 
| This macro checks for the forkandvforkfunctions. If a
workingforkis found, defineHAVE_WORKING_FORK. This macro
checks whetherforkis just a stub by trying to run it.If  Since this macro defines  #if !HAVE_WORKING_VFORK # define vfork fork #endif | 
| AC_FUNC_FSEEKO | Macro | 
| If the fseekofunction is available, defineHAVE_FSEEKO. 
Define_LARGEFILE_SOURCEif necessary. | 
| AC_FUNC_GETGROUPS | Macro | 
| If the getgroupsfunction is available and works (unlike on
Ultrix 4.3, wheregetgroups (0, 0)always fails), defineHAVE_GETGROUPS.  SetGETGROUPS_LIBSto any libraries
needed to get that function.  This macro runsAC_TYPE_GETGROUPS. | 
| AC_FUNC_GETLOADAVG | Macro | 
| Check how to get the system load averages.  If the system has the getloadavgfunction, defineHAVE_GETLOADAVG, and setGETLOADAVG_LIBSto any libraries needed to get that function. 
Also addGETLOADAVG_LIBStoLIBS.Otherwise, require an  
 | 
| AC_FUNC_GETMNTENT | Macro | 
| Check for getmntentin thesun,seq, andgenlibraries, for Irix 4, PTX, and Unixware, respectively.  Then, ifgetmntentis available, defineHAVE_GETMNTENT. | 
| AC_FUNC_GETPGRP | Macro | 
| Define GETPGRP_VOIDif it is an error to pass 0 togetpgrp; this is the POSIX.1 behavior.  On older BSD
systems, you must pass 0 togetpgrp, as it takes an argument and
behaves like POSIX.1'sgetpgid.#if GETPGRP_VOID pid = getpgrp (); #else pid = getpgrp (0); #endif This macro does not check whether
 | 
| AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK | Macro | 
| If linkis a symbolic link, thenlstatshould treatlink/the same aslink/..  However, many olderlstatimplementations incorrectly ignore trailing slashes.It is safe to assume that if  If  | 
| AC_FUNC_MALLOC | Macro | 
| If the mallocworks correctly (malloc (0)returns a valid
pointer), defineHAVE_MALLOC. | 
| AC_FUNC_MEMCMP | Macro | 
| If the memcmpfunction is not available, or does not work on
8-bit data (like the one on SunOS 4.1.3), or fails when comparing 16
bytes or more and with at least one buffer not starting on a 4-byte
boundary (such as the one on NeXT x86 OpenStep), require anAC_LIBOBJreplacement formemcmp. | 
| AC_FUNC_MKTIME | Macro | 
| If the mktimefunction is not available, or does not work
correctly, require anAC_LIBOBJreplacement formktime. | 
| AC_FUNC_MMAP | Macro | 
| If the mmapfunction exists and works correctly, defineHAVE_MMAP.  Only checks private fixed mapping of already-mapped
memory. | 
| AC_FUNC_OBSTACK | Macro | 
| If the obstacks are found, define HAVE_OBSTACK, else require anAC_LIBOBJreplacement forobstack. | 
| AC_FUNC_SELECT_ARGTYPES | Macro | 
| Determines the correct type to be passed for each of the selectfunction's arguments, and defines those types
inSELECT_TYPE_ARG1,SELECT_TYPE_ARG234, andSELECT_TYPE_ARG5respectively.SELECT_TYPE_ARG1defaults
toint,SELECT_TYPE_ARG234defaults toint *,
andSELECT_TYPE_ARG5defaults tostruct timeval *. | 
| AC_FUNC_SETPGRP | Macro | 
| If setpgrptakes no argument (the POSIX.1 version), defineSETPGRP_VOID.  Otherwise, it is the BSD version, which takes
two process IDs as arguments.  This macro does not check whethersetpgrpexists at all; if you need to work in that situation,
first callAC_CHECK_FUNCforsetpgrp. | 
| AC_FUNC_STAT | Macro | 
| AC_FUNC_LSTAT | Macro | 
| Determine whether statorlstathave the bug that it
succeeds when given the zero-length file name argument.  Thestatandlstatfrom SunOS 4.1.4 and the Hurd (as of 1998-11-01) do
this.If it does, then define  | 
| AC_FUNC_SETVBUF_REVERSED | Macro | 
| If setvbuftakes the buffering type as its second argument and
the buffer pointer as the third, instead of the other way around, defineSETVBUF_REVERSED. | 
| AC_FUNC_STRCOLL | Macro | 
| If the strcollfunction exists and works correctly, defineHAVE_STRCOLL.  This does a bit more thanAC_CHECK_FUNCS(strcoll), because some systems have incorrect
definitions ofstrcollthat should not be used. | 
| AC_FUNC_STRTOD | Macro | 
| If the strtodfunction does not exist or doesn't work correctly,
ask for anAC_LIBOBJreplacement ofstrtod.  In this case,
becausestrtod.cis likely to needpow, set the output
variablePOW_LIBto the extra library needed. | 
| AC_FUNC_STRERROR_R | Macro | 
| If strerror_ris available, defineHAVE_STRERROR_R, and if
it is declared, defineHAVE_DECL_STRERROR_R.  If it returns achar *message, defineSTRERROR_R_CHAR_P; otherwise it
returns aninterror number.  The Thread-Safe Functions option of
POSIX-200X requiresstrerror_rto returnint, but
many systems (including, for example, version 2.2.4 of the GNU C
Library) return achar *value that is not necessarily equal to
the buffer argument. | 
| AC_FUNC_STRFTIME | Macro | 
| Check for strftimein theintllibrary, for SCO UNIX. 
Then, ifstrftimeis available, defineHAVE_STRFTIME. | 
| AC_FUNC_STRNLEN | Macro | 
| Check for a working strnlen, and ask for its replacement.  Some
architectures are know to provide broken versions ofstrnlen, such
as AIX 4.3. | 
| AC_FUNC_UTIME_NULL | Macro | 
| If utime(file, NULL)sets file's timestamp to
the present, defineHAVE_UTIME_NULL. | 
| AC_FUNC_VPRINTF | Macro | 
| If vprintfis found, defineHAVE_VPRINTF.  Otherwise, if_doprntis found, defineHAVE_DOPRNT.  (Ifvprintfis available, you may assume thatvfprintfandvsprintfare also available.) |