/[autoconf]/autoconf/doc/autoconf.texi
ViewVC logotype

Diff of /autoconf/doc/autoconf.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.630 by eggert, Thu Jun 6 17:55:14 2002 UTC revision 1.631 by akim, Fri Jun 7 07:17:54 2002 UTC
# Line 3540  If the @code{error_at_line} function is Line 3540  If the @code{error_at_line} function is
3540  @code{AC_LIBOBJ} replacement of @samp{error}.  @code{AC_LIBOBJ} replacement of @samp{error}.
3541  @end defmac  @end defmac
3542    
3543  @defmac AC_FUNC_FNMATCH (@ovar{dir})  @defmac AC_FUNC_FNMATCH
3544  @acindex FUNC_FNMATCH  @acindex FUNC_FNMATCH
3545  @c @fuindex fnmatch  @c @fuindex fnmatch
3546  @prindex @code{fnmatch}  @prindex @code{fnmatch}
3547  If the @code{fnmatch} function conforms to @acronym{POSIX}, define  If the @code{fnmatch} function conforms to @acronym{POSIX}, define
3548  @code{HAVE_FNMATCH}.  Detect common implementation bugs, for example,  @code{HAVE_FNMATCH}.  Detect common implementation bugs, for example,
3549  the bugs in Solaris 2.4.  If @var{dir} is nonempty, the files  the bugs in Solaris 2.4.
3550  @file{fnmatch.c}, @file{fnmatch_loop.c}, and @file{fnmatch_.h} in the  
3551  directory @var{dor} are assumed to contain a copy of the source code  Note that for historical reasons, contrary to the other specific
3552  of @acronym{GNU} @code{fnmatch}.  If necessary, this source code is  @code{AC_FUNC} macros, @code{AC_FUNC_FNMATCH} does not replace
3553  compiled as an @code{AC_LIBOBJ} replacement, and the @file{fnmatch_.h}  broken/missing @code{fnmatch}.  See @code{AC_REPLACE_FNMATCH} below.
 file is linked to @file{fnmatch.h} so that it can be included in place  
 of the system @code{<fnmatch.h>}.  
3554  @end defmac  @end defmac
3555    
3556  @defmac AC_FUNC_FNMATCH_GNU (@ovar{dir})  @defmac AC_FUNC_FNMATCH_GNU
3557  @acindex FUNC_FNMATCH_GNU  @acindex FUNC_FNMATCH_GNU
3558  @c @fuindex fnmatch  @c @fuindex fnmatch
3559  @prindex @code{fnmatch}  @prindex @code{fnmatch}
3560  Behave like @code{AC_FUNC_FNMATCH(@var{dir})}, but also test whether  Behave like @code{AC_FUNC_FNMATCH}, but also test whether @code{fnmatch}
3561  @code{fnmatch} supports @acronym{GNU} extensions.  Detect common  supports @acronym{GNU} extensions.  Detect common implementation bugs,
3562  implementation bugs, for example, the bugs in the @acronym{GNU} C  for example, the bugs in the @acronym{GNU} C Library 2.1.
 Library 2.1.  
3563  @end defmac  @end defmac
3564    
3565  @defmac AC_FUNC_FORK  @defmac AC_FUNC_FORK
# Line 3621  Ultrix 4.3, where @samp{getgroups (0, 0) Line 3618  Ultrix 4.3, where @samp{getgroups (0, 0)
3618  needed to get that function.  This macro runs @code{AC_TYPE_GETGROUPS}.  needed to get that function.  This macro runs @code{AC_TYPE_GETGROUPS}.
3619  @end defmac  @end defmac
3620    
3621  @defmac AC_FUNC_GETLOADAVG (@dvar{dir, .})  @defmac AC_FUNC_GETLOADAVG
3622  @acindex FUNC_GETLOADAVG  @acindex FUNC_GETLOADAVG
3623  @cvindex SVR4  @cvindex SVR4
3624  @cvindex DGUX  @cvindex DGUX
# Line 3638  needed to get that function.  This macro Line 3635  needed to get that function.  This macro
3635  @ovindex GETLOADAVG_LIBS  @ovindex GETLOADAVG_LIBS
3636  @c @fuindex getloadavg  @c @fuindex getloadavg
3637  @prindex @code{getloadavg}  @prindex @code{getloadavg}
3638  Check how to get the system load averages.  If the system has the  Check how to get the system load averages.  To perform it tests
3639  @code{getloadavg} function, define @code{HAVE_GETLOADAVG}, and set  properly, this macro needs the file @file{getloadavg.c}; therefore, be
3640  @code{GETLOADAVG_LIBS} to any libraries needed to get that function.  sure to set the @code{AC_LIBOBJ} replacement directory properly (see
3641  Also add @code{GETLOADAVG_LIBS} to @code{LIBS}.  @ref{Generic Functions}, @code{AC_CONFIG_LIBOBJ_DIR}).
3642    
3643  Otherwise, require an @code{AC_LIBOBJ} replacement for  If the system has the @code{getloadavg} function, define
3644  @samp{getloadavg} with source code in @file{@var{dir}/getloadavg.c},  @code{HAVE_GETLOADAVG}, and set @code{GETLOADAVG_LIBS} to any libraries
3645  and possibly define several other C preprocessor  needed to get that function.  Also add @code{GETLOADAVG_LIBS} to
3646  macros and output variables:  @code{LIBS}.  Otherwise, require an @code{AC_LIBOBJ} replacement for
3647    @samp{getloadavg} with source code in @file{@var{dir}/getloadavg.c}, and
3648    possibly define several other C preprocessor macros and output
3649    variables:
3650    
3651  @enumerate  @enumerate
3652  @item  @item
# Line 3909  is available, you may assume that @code{ Line 3909  is available, you may assume that @code{
3909  are also available.)  are also available.)
3910  @end defmac  @end defmac
3911    
3912    @defmac AC_REPLACE_FNMATCH
3913    @acindex REPLACE_FNMATCH
3914    @c @fuindex fnmatch
3915    @prindex @code{fnmatch}
3916    If the @code{fnmatch} function does not conform to @acronym{POSIX} (see
3917    @code{AC_FUNC_FNMATCH}), ask for its @code{AC_LIBOBJ} replacement.
3918    
3919    The files @file{fnmatch.c}, @file{fnmatch_loop.c}, and @file{fnmatch_.h}
3920    in the @code{AC_LIBOBJ} replacement directory are assumed to contain a
3921    copy of the source code of @acronym{GNU} @code{fnmatch}.  If necessary,
3922    this source code is compiled as an @code{AC_LIBOBJ} replacement, and the
3923    @file{fnmatch_.h} file is linked to @file{fnmatch.h} so that it can be
3924    included in place of the system @code{<fnmatch.h>}.
3925    @end defmac
3926    
3927    @defmac AC_REPLACE_FNMATCH_GNU
3928    @acindex REPLACE_FNMATCH_GNU
3929    @c @fuindex fnmatch
3930    @prindex @code{fnmatch}
3931    Samr as @code{AC_REPLACE_FNMATCH}, but requiring the @acronym{GNU}
3932    extensions to @code{fnmatch} (see @code{AC_FUNC_FNMATCH_GNU}).
3933    @end defmac
3934    
3935    
3936    
3937  @node Generic Functions  @node Generic Functions
3938  @subsection Generic Function Checks  @subsection Generic Function Checks
3939    
# Line 3942  execute when one of the functions is fou Line 3967  execute when one of the functions is fou
3967  functions is not found.  functions is not found.
3968  @end defmac  @end defmac
3969    
3970    @sp 1
3971    
3972  Autoconf follows a philosophy that was formed over the years by those  Autoconf follows a philosophy that was formed over the years by those
3973  who have struggled for portability: isolate the portability issues in  who have struggled for portability: isolate the portability issues in
3974  specific files, and then program as if you were in a @sc{posix}  specific files, and then program as if you were in a @sc{posix}
3975  environment.  Some functions may be missing or unfixable, and your  environment.  Some functions may be missing or unfixable, and your
3976  package must be ready to replace them.  package must be ready to replace them.
3977    
 Use the first three of the following macros to specify a function to be  
 replaced, and the last one (@code{AC_REPLACE_FUNCS}) to check for and  
 replace the function if needed.  
   
3978  @defmac AC_LIBOBJ (@var{function})  @defmac AC_LIBOBJ (@var{function})
3979  @acindex LIBOBJ  @acindex LIBOBJ
3980  @ovindex LIBOBJS  @ovindex LIBOBJS
# Line 4004  AC_LIBOBJ($foo_or_bar) Line 4027  AC_LIBOBJ($foo_or_bar)
4027  @end example  @end example
4028  @end defmac  @end defmac
4029    
4030    @defmac AC_CONFIG_LIBOBJ_DIR (@var{directory})
4031    @acindex CONFIG_LIBOBJ_DIR
4032    Specify that @code{AC_LIBOBJ} replacement files are to be found in
4033    @var{directory} (which defaults to @samp{.}, the top source directory).
4034    @command{configure} might need to know where these files are for the
4035    following reasons: (i) some checks use the replacement files, (ii) some
4036    macros bypass broken system headers by installing links to the
4037    replacement headers etc.
4038    @end defmac
4039    
4040    @sp 1
4041    
4042    It is common to merely check for the existence of a function, and ask
4043    for its @code{AC_LIBOBJ} replacement if missing.  The following macro is
4044    a convenient shorthand.
4045    
4046  @defmac AC_REPLACE_FUNCS (@var{function}@dots{})  @defmac AC_REPLACE_FUNCS (@var{function}@dots{})
4047  @acindex REPLACE_FUNCS  @acindex REPLACE_FUNCS
4048  @ovindex LIBOBJS  @ovindex LIBOBJS

Legend:
Removed from v.1.630  
changed lines
  Added in v.1.631

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26