2005-06-30 Stepan Kasal * doc/autoconf.texi (Configuration Headers): Change the explanation about #include . Index: doc/autoconf.texi =================================================================== RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v retrieving revision 1.923 diff -u -r1.923 autoconf.texi --- doc/autoconf.texi 30 Jun 2005 12:55:46 -0000 1.923 +++ doc/autoconf.texi 30 Jun 2005 14:48:05 -0000 @@ -2653,13 +2653,19 @@ The package should @samp{#include} the configuration header file before any other header files, to prevent inconsistencies in declarations (for -example, if it redefines @code{const}). Use @samp{#include } -instead of @samp{#include "config.h"}, and pass the C compiler a address@hidden option (or @option{-I..}; whichever directory contains address@hidden). That way, even if the source directory is configured -itself (perhaps to make a distribution), other build directories can -also be configured without finding the @file{config.h} from the source -directory. +example, if it redefines @code{const}). + +To provide for VPATH buils, remember to pass the C compiler a @option{-I.} +option (or @option{-I..}; whichever directory contains @file{config.h}). +Even if you use @samp{#include "config.h"}, the preprocessor searches only +the directory of the currently read file, address@hidden the source directory, not +the build directory. + +With the appropriate @option{-I} option, you can use address@hidden }. Actually, it's a good habit to use it, +because in the rare case when the source directory contains another address@hidden, the build directory should be searched first. + @defmac AC_CONFIG_HEADERS (@var{header} @dots{}, @ovar{cmds}, @ovar{init-cmds}) @acindex{CONFIG_HEADERS}