11.3. Installing Header Files

Why Can't I Install 'config.h'?

One of the more difficult problems with GNU Autotools–driven projects is that each of them depends on 'config.h' (or its equivalent) and the project-specific symbols that it defines. The purpose of this file is to #include it from all the project source files. The preprocessor can then tailor the code in these files to the target environment.

It is often difficult and sometimes impossible to not introduce a dependency on 'config.h' from one of the project's installable header files. It would be nice if you could just install the generated 'config.h', but even if you name it carefully or install it to a subdirectory to avoid filename problems, the macros it defines will clash with ...

Get GNU Autoconf, Automake, and Libtool now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.