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:51:54 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030313

I did try this intially as well, converting the config.h to a
derived xconfig.h with all defines being #ifndef/def. It
did turn out to be problematic with some packages
having parts of their public header defines enabled/disabled
depending on configure-time values packed onto
xconfig.h - including however a second xconfig.h made
some of those parts suddenly appear/disappear or
simply change in the middle, possibly even leading
to linker errors. Effectivly, do not mix configure-time
values of different packages as they may have been
configured on different systems (especially true for
rpm *-devel systems). Just make sure that all the
packages use different symbols to transport their
configure-time autodetected values. That can be
done traditionally, with an extra myconfig.h.in (to
be written manually) or by using ax_prefix_config_h
to ship around a prefix'er autogenenerated header.

have fun, guido


Thomas 'Tom' R. Treadway III wrote:
I agree, I've run into this problem. Depending on the
compiler and options this may end up being a fatal
compile error.

It would be better to use:
#ifndef PACKAGE_VERSION
#define PACKAGE_VERSION
#endif ! PACKAGE_VERSION

   trt

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?

Sincerely, Patrick




--
Thomas R. Treadway
Computer Scientist
Lawrence Livermore Nat'l Lab
7000 East Avenue, L-365
Livermore, CA 94550-0611





--
-- guido                                  http://google.de/search?q=guidod
GCS/E/S/P C++/++++$ ULHS L++w- N++@ s+:a d(+-) r+@>+++ y++ 5++X- (geekcode)





reply via email to

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