automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiple definition of VERSION, PACKAGE and so on


From: Guido Draheim
Subject: Re: Multiple definition of VERSION, PACKAGE and so on
Date: Mon, 22 Mar 2004 20:43:12 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030313



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++





reply via email to

[Prev in Thread] Current Thread [Next in Thread]