bug-gnulib
[Top][All Lists]
Advanced

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

Re: PACKAGE, VERSION, & PACKAGE_VERSION


From: Bruno Haible
Subject: Re: PACKAGE, VERSION, & PACKAGE_VERSION
Date: Fri, 7 Aug 2009 22:33:20 +0200
User-agent: KMail/1.9.9

Sam Steingold wrote:
> 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?

They come from AM_INIT_AUTOMAKE.

> why do I get a warning for them (but not for PACKAGE_*)?

Because redefinitions of C macros warrant maintainer attention.

> how do I avoid these warnings?

This is documented in automake's documentation:

  `AM_INIT_AUTOMAKE([OPTIONS])'
  `AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])'

     ...

     By default this macro `AC_DEFINE''s `PACKAGE' and `VERSION'.  This
     can be avoided by passing the `no-define' option, as in:
          AM_INIT_AUTOMAKE([gnits 1.5 no-define dist-bzip2])
     or by passing a third non-empty argument to the obsolete form.

If everything else fails, you can also add a

  #undef PACKAGE
  #undef VERSION

at the appropriate place. (Hacking around.)

Bruno




reply via email to

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