summaryrefslogtreecommitdiff
path: root/popt
diff options
context:
space:
mode:
authorklarlund <klarlund@gmail.com>2008-05-09 18:15:18 +0000
committerklarlund <klarlund@gmail.com>2008-05-09 18:15:18 +0000
commita31b5d6a22150bc54c93166910ba9f351081c659 (patch)
tree30374f419a5f86ad3f4357694162f8c248b611d1 /popt
parente76bb3a5577f9077249b32dea98ebfa45ccc497c (diff)
downloaddistcc-git-a31b5d6a22150bc54c93166910ba9f351081c659.tar.gz
Make handling of config.h sound.
(1) Correct order of -Is in Makefile. (2) remove unnessary PATH modification in configure.ac (this is fergus's suggestion -- hopefully this will do, this replaces a circumvention mechanism I had originally concocted. (3) Fix place of the include of popt in CPPFLAGS. (4) Convert quoted includes of config.h to angle bracket includes so that the build version, not the source version, of this file is picked up. The order of -Is in the build system is wrong: it contradicts the VPATH mechanism. This means that builds in a build directory different from that of the source (distribution) directory will find wrong files even after the hapless developer has issued only a 'configure' command in the source directory (but not actually 'made' any thing there). For in that case, the src/config.h will be generated in the source directory and this will be the file picked in the build directory even if that directory has it's own src/config.h. This can lead to wrong builds and it can be hard to diagnose the problem. Currently, this what CPPFLAGS end up being (as found in the generated Makefile): CPPFLAGS = -DHAVE_CONFIG_H -D_GNU_SOURCE \ -I../distcc/popt -I../distcc/src \ ${DIR_DEFS} \ -Isrc -Ilzo \ -I"$(srcdir)/src" -I"$(srcdir)/lzo" \ Here my source dir was ../distcc. The presence of '-I../distcc/popt' in front of -Isrc is the exact opposite of the semantics of VPATH mechanism, which looks for files in the build directory, then in the source directory. Also, note the remarks in: http://www.gnu.org/software/autoconf/manual/autoconf.html#Configuration-Headers (they do not quite correctly discuss the search path, btw). TESTING: I verified that with a corrupted config.h file in the source directory, building now succeeds. Also: make distcheck (it fails the same place as before: this is corrected in another change of mine --- I'll verify that with that change in place, this change makes 'make distcheck' succeed.) REVIEWERS: fergus@google.com, csilvers@google.com
Diffstat (limited to 'popt')
-rw-r--r--popt/system.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/popt/system.h b/popt/system.h
index 1d1b9da..dc1ae69 100644
--- a/popt/system.h
+++ b/popt/system.h
@@ -1,5 +1,5 @@
#ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
#endif
#if defined (__GLIBC__) && defined(__LCLINT__)