From: Maurice L. <mj...@ga...> - 2003-01-30 04:41:56
|
Rafael Laboissiere writes: > I think that the right approach to this is to create a top-level config.h > file (eventually using autoheader) that will contain all the defines that > shouldn't appear in the user namespace and remove them from plConfig.h. In > plConfig.h, we add: > > #if HAVE_CONFIG_H > # include <config.h> > #endif > > Remeber that -DHAVE_CONFIG_H is automatically added by automake to the > CFLAGS when the package is built, so the scheme above should work. > > Now, when users will compile their applications linked against the PLplot > library, the config.h file will not be included, unless they (foolishly and > unnecessarily) #define HAVE_CONFIG_H. > > In configure.ac, we should use: > > AC_CONFIG_HEADERS([config.h include/plConfig.h include/plDevs.h]) > > Notice that there is a beneficial side-effect to this: many of the > autoheader problems that we were experiencing may be fixed, since autoheader > only acts on the first argument of the macro AC_CONFIG_HEADERS. > > What do you think? If this works the way you describe, it sounds great. -- Maurice LeBrun mj...@ga... Research Organization for Information Science and Technology of Japan (RIST) |