On 2004-02-18T10:15-0600, Bob Friesenhahn wrote: ) On Wed, 18 Feb 2004, Daniel Reed wrote: ) > If at all possible, simply do not include both config.h files in your code. ) > If you need the output from one autoconf check in both config.h files, ) > simply repeat the check in both project's configure.ac files. ) This is not very efficient and doesn't make much sense at all. If the I tend to disagree, given the availability of -C. It is my general stance that packages should not be checking for things they, themselves, do not use (even if their subordinate packages may). Let the master package check for things it needs, let its subordinates check for things they need, and if there is overlap, rely on autoconf to do The Right Thing(TM). This is how libltdl works, and this is how I have constructed my own sub-packages to work. foomaster/libfoo/*.c include foomaster/libfoo/config.h foomaster/libltdl/*.c include foomaster/libltdl/config.h foomaster/backend/*.c include foomaster/config.h foomaster/src/*.c include foomaster/config.h etc. foomaster/configure calls foomaster/libfoo/configure, passing all of its command-line arguments (even the ones it didn't necessarily understand, as they may be libfoo-specific). ) library configuration uses user supplied configuration options then ) there may be a mis-match and bad things will happen. It doesn't make ) sense for an image library's configuration script to test to see if ) X11 supports the shape extension because it relies on some other ) library to handle X11. I am not personally convinced that recording installed-software availability information (and subsequent feature capabilities) in header files is the right thing to do. Consider: If I install libfoo and it requires libbar to support .bar files, what happens if I later install libbar? I must recompile libfoo. If I installed foomaster in the meantime, and it relied on libfoo.h claiming that .bar files were not supported, foomaster would need to be recompiled as well (after recompiling libfoo, after installing libbar). Checks like that should probably be performed at run time (using lt_dlopen or other mechanisms), and not be compiled in at all (since they are not really platform compatibility issues). ) Library headers are often dependent on the library's "config.h". The And just to reiterate, I consider that to be poor practice. Auto-generated config.h files should rarely, if ever, escape the build tree. -- Daniel Reed <n@xxxxxx> http://naim-users.org/nmlorg/ http://naim.n.ml.org/ A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. -- Douglas Adams, Novelist