Alan DeKok schrieb:
That has my vote. Except that last I checked, autoconf doesn't process header files. So some other method has to be used.
Have you tried to declare AM_CONFIG_HEADER(include/freeradius-client.h) in configure.in like for config.h, rename freeradius-client.h to freeradius-client.h.in and add the specific defines at the top like autoheader would to for config.h? Like this: freeradius-client.h.in: ... #undef HAVE_INTTYPES_H #undef HAVE_STDINT_H ... #ifdef HAVE_INTTYPES_H #include <inttypes.h> #endif #ifdef HAVE_STDINT_H #include <stdint.h> #endif I think maintaining a small number of #undef templates manually should be no big deal. Running configure will replace the #undef templates with the appropriate values. The only problem with freeradius-client.h currently would be the use of other #undef directives with the __BEGIN_DECLS stuff. configure will comment them out. May be it would be possible to implement the C++ extern declaration in another way ... Or distribute a second (config) header freeradius-clientconfig.h included by freeradius-client.h, but never ever name it autoconf.h. Enrik