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: "Thomas 'Tom' R. Treadway III" <treadway1 at llnl dot gov>
- 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 11:22:42 -0800
- Subject: Re: Multiple definition of VERSION, PACKAGE and so on
- References: <Pine.SOL.4.58-L.0403221538140.11111@aurora.uio.no>
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