Hi,
If example-util's build system does not check for the availability of const, and example-util uses libexample's header files which do use const, the build will fail.
On the other hand, if libexample's build system detected a lack of const and includes a workaround (for example, defining "const" away with a preprocessor macro), then later example-util is compiled in an environment that *does* have const, building example-util with libexample's header files will change the behavior of example-util in unexpected and unnecessary ways.
The former can be mitigated by having libexample's developers distribute a libexample.m4 file which can be referenced during example-util's build environment setup, to avoid requiring that example-util's developers track libexample's individual requirements.
I had heard about prefixed config.h files, and I thought they were the solution to my problem. But I think yours is a much better solution. I will try to change my projects to follow this approach.
But this also means that I have to learn how to write *.m4 files :-( Can you give me some hints on: * How to write this libexample.m4 ( a kind of sketch ) * How to install libexample.m4 (something like this in a Makefile.am: libexample_so_M4MACROS = libexample.m4 libexample_m4dir = $(m4dir) ) * Where to install the *.m4 file
* Whether I should or not include a #ifdef HAVECONFIG_H in my installed headers
Writing this e-mail I just realized that if there is a standard way to create and install libexample.m4 then most of the problems can be solved. Does this standard way exists?
Thank you, Andre Caldas.
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf