processing include files
aland at deployingradius.com
Sun Jul 8 12:45:53 CEST 2007
Enrik Berkhan wrote:
> Have you tried to declare
That adds defines. It doesn't *process* the header files in the same
way as the *.in files are processed. i.e. You can't do substitutions of
@@FOO@@ -> value of foo.
Those substitutions can be done for any *other* kind of file, but not
(apparently) header files.
> 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:
> #undef HAVE_INTTYPES_H
> #undef HAVE_STDINT_H
No. Absolutely not. That's exactly the same thing as net-snmp's
"solution" of installing the autoconf.h file. Anyone *using*
freeradius-client will have their header files polluted with the
definitions of HAVE_INTTYPES_H.
I tried to build FreeRADIUS without pthread support. I discovered at
one point I couldn't do that *and* use SNMP, because the SNMP header
files defined HAVE_PTHREAD_H.
> Running configure will replace the #undef templates with the appropriate
No. The freeradius-client.h file that's installed *must* have no
#define's other than the ones it uses for it's own purposes. If it
needs to include <stdint.h>, the file needs to be massaged to do so,
WITHOUT HAVE_STDINT_H, etc. nonsense.
> Or distribute a second (config) header freeradius-clientconfig.h
> included by freeradius-client.h, but never ever name it autoconf.h.
That is the same solution as net-snmp uses. The filename is
irrelevant. The bad practice of polluting the HAVE_* namespace is wrong.
More information about the Freeradius-Devel