]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Change the explanation about #include <config.h>.
authorStepan Kasal <kasal@ucw.cz>
Fri, 1 Jul 2005 05:55:41 +0000 (05:55 +0000)
committerStepan Kasal <kasal@ucw.cz>
Fri, 1 Jul 2005 05:55:41 +0000 (05:55 +0000)
ChangeLog
doc/autoconf.texi

index fddc6ccc79f5b61a7cb876d5db5bbe2e1379f6de..c383755ca81091d28df4aaac3959f12348a5ad93 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-06-30  Stepan Kasal  <kasal@ucw.cz>
+
+       * doc/autoconf.texi (Configuration Headers): Change the explanation
+       about #include <config.h>.
+
 2005-06-30  Stepan Kasal  <kasal@ucw.cz>
 
        * lib/autoconf/status.m4: Fix the order of the "sections", so that it
index 4ce9bf0655f57b074d4bec419d31272884d01efa..f37cbb2b35b8ed54dd6e4b341f29ea7cc995a0e5 100644 (file)
@@ -2653,13 +2653,19 @@ macro selects this kind of output.  It should be called right after
 
 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 <config.h>}
-instead of @samp{#include "config.h"}, and pass the C compiler a
-@option{-I.} option (or @option{-I..}; whichever directory contains
-@file{config.h}).  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 builds, 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, ie@. the source directory, not
+the build directory.
+
+With the appropriate @option{-I} option, you can use
+@samp{#include <config.h>}.  Actually, it's a good habit to use it,
+because in the rare case when the source directory contains another
+@file{config.h}, the build directory should be searched first.
+
 
 @defmac AC_CONFIG_HEADERS (@var{header} @dots{}, @ovar{cmds}, @ovar{init-cmds})
 @acindex{CONFIG_HEADERS}