This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: Multiple definition of VERSION, PACKAGE and so on
- From: Guido Draheim <guidod-2003- at gmx dot de>
- To: Patrick Guio <patrick dot guio at matnat dot uio dot no>
- Cc: bug-autoconf at gnu dot org, automake at gnu dot org
- Date: Mon, 22 Mar 2004 20:43:12 +0100
- Subject: Re: Multiple definition of VERSION, PACKAGE and so on
- References: <Pine.SOL.4.58-L.0403221538140.11111@aurora.uio.no>
Patrick Guio wrote:
Dear all,
This is not really a bug but I wonder if you have any remedy to the
following problem. If you use autoconf/automake for several packages
which interact with each other and for each package you generate a
^^^^^^^^^^^^^^^^^^
configuration file config.h you migh end up with redefinition warning
message if config.h's are read "together".
^^^^^^^^^^^^^^^^^^
... warning: "PACKAGE_VERSION" redefined
... warning: this is the location of the previous definition
... warning: "VERSION" redefined
... warning: this is the location of the previous definition
My concern is how to avoid this? Shouldn't these macro defintion be unique
for each package? Should there be a protection mechanism?
*How* do you let them "interact with each other"?
*Why* are config.h's read together?
To answer right away on a frequently asked question: do not install
config.h and do not #include it in public headers of a (sub)project.
Use ax_prefix_config_h to avoid problems with ac_define's
occuring in two autoconfigured header files instead.
btw, -> autoconf people, may be we should move the prefix'config
macro to main autoconf and/or reference it in main documentation?
cheers,
-- guido http://ac-archive.sf.net
GCS/E/S/P C++/++++$ ULHS L++w- N++@ s+:a d(+-) r+@>+++ y++