Hi Loïc,

* Loïc Minier wrote on Thu, May 25, 2006 at 06:22:52PM CEST:
> 
>  When I run autoconf 2.59.cvs.2006.05.13-1, and then ./configure, the
>  resulting #define VERSION in config.h is not quoted in the same way.
>  It now ends up with:
>     #define VERSION 1.4.1
>  while with autoconf 2.59a-9, this resulted in:
>     #define VERSION "1.4.1"
> 
>  This seems like a regression / backward-incompatibility in autoconf,
>  but perhaps totem's configure.in is doing something evil.

Yes, the configure.in snippet you posted is weird.  Even with
autoconf-2.59, if you look at a generated config.status file, you will
see that there are two substitutions for VERSION in config headers, one
right, and one wrong.  So there is a "race" between them; and since the
order of their execution changes with 2.59c, the bad one wins now.  I'm
still not certain that the change of order isn't a regression, but in
any case you should be able to fix that (and make totem's configure.in
work with both 2.59 and 2.60) by doing these changes:

>  totem's configure.in uses:
>  m4_define(totem_version_major, 1)
>  m4_define(totem_version_minor, 4)
>  m4_define(totem_version_micro, 1)
> 
>  AC_INIT(totem,
>          totem_version_major.totem_version_minor.totem_version_micro,
>          http://bugzilla.gnome.org/enter_bug.cgi?product=totem)
>  AC_CONFIG_SRCDIR(src/totem.c)
>  AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)

(Unrelated to the error you're seeing, but nicer anyway:)
Make this line
   AM_INIT_AUTOMAKE

only.  (This change requires Automake 1.6 or newer, so if there is a
chance the developers use an older version, be sure to put
   AUTOMAKE_OPTIONS = 1.6

in the toplevel Makefile.am; for newer Automake, the syntax
   AM_INIT_AUTOMAKE([1.6])

would work, but since that isn't recognized by <=1.6, there is no point.)

>  AM_CONFIG_HEADER(config.h)
>  [...]
>  AC_DEFINE(VERSION, AC_PACKAGE_VERSION, [package version])

You should be able to just remove this line.  Make sure you don't have
the Automake option `no-define' set (see above for where Automake
options may have been set).  Written correctly, this line should have
been 
   AC_DEFINE(VERSION, "AC_PACKAGE_VERSION", [package version])
or
   AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [package version])

but exactly that is done by Automake already.

>  AC_SUBST(VERSION)

And remove this one, too.  It's done by Automake in any case.

Skimming automake/NEWS it seems these two last quoted lines were added
to work around an Automake bug fixed in 1.7.3.  So if for no other
reason, you might want to require that version.

Cheers,
Ralf

Reply via email to