Robert Boehne <[EMAIL PROTECTED]> writes:
> I have a massive set of C++ libraries that use
> CVS libtool, autoconf and automake to build and install.
> Since users then need to have _all_ the header files
> they also need to have the configure generated config.h
> 
> What is the "best" way to coerce Automake into installing
> config.h in $(prefix) ?

I must caution against installing config.h.  You will collide with the
potential same config.h and HAVE* et al defines that the application
using your header files has figured out for itself.

It's much preferable to make sure that the installed include-files do
not depend on the autoconf'd parameters in any way.  If you really
need to use the definitions that configure has figured out for you,
it's much better, I think, to partial-evaluate so that instead of:

bar.h:

#ifdef HAVE_FOO_H
#include <foo.h>
#endif

you make it unconditional (empty or just with the include).  This will
make that file machine-dependent, but you can most likely limit this
to one file and have all the other header files be shared.

And if you install config.h, it should be as PACKAGE-config.h.

/assar

Reply via email to