Hi,
I have the following setup:
main package (with its own configure.in[1]) which imports stuff from gnulib
~20 sub-packages (each with its own configure.in[2])
 of which 3 import stuff from gnulib.
sub-packages include the main package's config.h before their own config.h.

Every single config.h has PACKAGE_VERSION (and a few other PACKAGE_*) defines and this has never been a problem - I have never seen any warnings about, say, PACKAGE_VERSION being redefined (even though each sub-package does defined them _differently_ from the main package, just compare [1] and [2]).

However, now I have a problem with the 3 sub-packages which use gnulib.
their config.h defines PACKAGE (same as PACKAGE_NAME) and VERSION (same as PACKAGE_VERSION) and I now do get the warning:

In file included from wildcard.c:4:
config.h:72:1: warning: "PACKAGE" redefined
In file included from wildcard.c:1:
/home/ssteingold/src/clisp/current/build-g-dynmod/linkkit/clisp.h:164:1: warning: this is the location of the previous definition
In file included from wildcard.c:4:
config.h:93:1: warning: "VERSION" redefined
In file included from wildcard.c:1:
/home/ssteingold/src/clisp/current/build-g-dynmod/linkkit/clisp.h:194:1: warning: this is the location of the previous definition

(clisp.h is derived from the main package config.h).
So, my question is:
where do PACKAGE and VERSION come from?
why do I get a warning for them (but not for PACKAGE_*)?
how do I avoid these warnings?

thanks
Sam

[1]http://clisp.cvs.sourceforge.net/viewvc/*checkout*/clisp/clisp/src/configure.in
[2]http://clisp.cvs.sourceforge.net/viewvc/*checkout*/clisp/clisp/modules/wildcard/configure.in



Reply via email to