The libodbc++ project has a similar problem. They solve it by
installing odbc++/config.h with rewritten macro
names like ODBCXX_HAVE_FOO.

The rule looks like this:

config.h: $(CONFIG_HEADER) config.h.in
        cat $(srcdir)/config.h.in > $@
        sed -e 's/#\([^ ][^ ]*\) \([^ ][^ ]*\)/#\1 ODBCXX_\2/g' >> $@ < 
$(CONFIG_HEADER)

Alex.

Bob Friesenhahn writes:
 > On 30 Mar 2000, Assar Westerlund wrote:
 > > > What's the preferred way to handle a package where various things in
 > > > the package header files depend on things that are figured out by
 > > > configure?
 > > 
 > > My take of this is that you have to generate a (installation-specific)
 > > header-file.  In other words, go from:
 > > 
 > > #ifdef HAVE_FOO_H
 > > #include <foo.h>
 > > #endif
 > > 
 > > to just:
 > > 
 > > #include <foo.h>
 > > 
 > > or nothing at all.
 > 
 > What about defines like WORDS_BIGENDIAN?  These certainly must appear
 > in a configuration header file.  It seems that the only protection is
 > to surround them with #ifndefs.  Even then, other packages may have
 > conflicting usage.
 > 
 > Bob
 > ======================================
 > Bob Friesenhahn
 > [EMAIL PROTECTED]
 > http://www.simplesystems.org/users/bfriesen

Reply via email to