/[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.687 by akim, Fri Oct 11 12:17:52 2002 UTC revision 1.688 by eggert, Fri Oct 11 23:53:09 2002 UTC
# Line 4459  test for it (@pxref{Writing Tests}). Line 4459  test for it (@pxref{Writing Tests}).
4459    
4460  @defmac AC_CHECK_HEADER (@var{header-file}, @ovar{action-if-found}, @ovar{action-if-not-found}, @dvar{includes, default-includes})  @defmac AC_CHECK_HEADER (@var{header-file}, @ovar{action-if-found}, @ovar{action-if-not-found}, @dvar{includes, default-includes})
4461  @acindex CHECK_HEADER  @acindex CHECK_HEADER
4462  If the system header file @var{header-file} is usable, execute shell  If the system header file @var{header-file} is compilable, execute shell
4463  commands @var{action-if-found}, otherwise execute  commands @var{action-if-found}, otherwise execute
4464  @var{action-if-not-found}.  If you just want to define a symbol if the  @var{action-if-not-found}.  If you just want to define a symbol if the
4465  header file is available, consider using @code{AC_CHECK_HEADERS}  header file is available, consider using @code{AC_CHECK_HEADERS}
4466  instead.  instead.
4467    
4468  The meaning of ``usable'' depends upon the content of @var{includes}:  Previous versions of Autoconf merely checked whether the header was
4469    accepted by the preprocessor.  This was changed because the old test
4470  @table @asis  was inappropriate for typical uses.  Headers are typically used to
4471  @item if @var{includes} is empty  compile, not merely to preprocess, and the old behavior sometimes
4472  check whether  accepted headers that clashed at compile-time.  If you need to check
4473    whether a header is preprocessable, you can use @code{AC_TRY_CPP} or
4474  @example  one of its variants (@pxref{Examining Declarations}).
 @var{header-file}  
 @end example  
   
 @noindent  
 can be @emph{preprocessed} without error.  
   
 @item if @var{include} is set  
 Check whether  
   
 @example  
 @var{includes}  
 #include <@var{header-file}>  
 @end example  
   
 @noindent  
 can be @emph{compiled} without error.  You may use  
 @code{AC_CHECK_HEADER} (and @code{AC_CHECK_HEADERS}) to check whether  
 two headers are compatible.  
 @end table  
   
 You may pass any kind of dummy content for @var{includes}, such as a  
 single space or a comment, to check whether @var{header-file} compiles  
 with success.  
4475  @end defmac  @end defmac
4476    
4477  @defmac AC_CHECK_HEADERS (@var{header-file}@dots{}, @ovar{action-if-found}, @ovar{action-if-not-found}, @dvar{includes, default-includes})  @defmac AC_CHECK_HEADERS (@var{header-file}@dots{}, @ovar{action-if-found}, @ovar{action-if-not-found}, @dvar{includes, default-includes})
# Line 4507  is given, it is additional shell code to Line 4484  is given, it is additional shell code to
4484  files is found.  You can give it a value of @samp{break} to break out of  files is found.  You can give it a value of @samp{break} to break out of
4485  the loop on the first match.  If @var{action-if-not-found} is given, it  the loop on the first match.  If @var{action-if-not-found} is given, it
4486  is executed when one of the header files is not found.  is executed when one of the header files is not found.
   
 Be sure to read the documentation of @code{AC_CHECK_HEADER} to  
 understand the influence of @var{includes}.  
4487  @end defmac  @end defmac
4488    
4489  @node Declarations  @node Declarations

Legend:
Removed from v.1.687  
changed lines
  Added in v.1.688

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