bug-autoconf
[Top][All Lists]
Advanced

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

Re: autoconf-2.66: AC_CONFIG_SUBDIRS and AC_INIT warns


From: Eric Blake
Subject: Re: autoconf-2.66: AC_CONFIG_SUBDIRS and AC_INIT warns
Date: Wed, 7 Jul 2010 01:28:28 -0400 (EDT)

----- "Ralf Wildenhues" <address@hidden> wrote:
> > With autoconf 2.65, no warning. With autoconf 2.66 (with or without
> your patch):
> > 
> >   $ autoconf
> >   configure.ac:1: warning: AC_INIT: not a literal: 2.48++
> (2010-07-03)
> > 
> > Yes, in some packages, the version number consists of two parts,
> separated by
> > a space.
> 
> The space isn't a what triggers the warning here, it's the
> parentheses
> around the date.

Agreed.  Per the new definition of literal that is documented in
2.66, the string `a(b)' is not a literal because:

a(b)
"a(b)"

do not behave the same in shell.  Likewise,

a b
"a b"

do not always behave the same, but for that, I introduced
AS_LITERAL_WORD_IF while keeping AS_LITERAL_IF with its
backward compatible behavior of accepting space (since it
is already in use by code that either did an m4 loop over
whitespace separated tokens, or by code that transliterated
space into _ before outputting the final script).

If we could guarantee that the version is always quoted, and
never passed around without "" protection, then we wouldn't need
to filter on whether it is a literal.  And since the documentation
does not state whether a version string relies on AS_LITERAL_IF,
we can also relax the test to transliterate () to something safer
before calling AS_LITERAL_IF under the hood, if we wanted to.

>  OTOH, at least for Automake, the space is also a
> problem, because $(PACKAGE)-$(VERSION) is used for distdir and not
> consistently quoted.  Sure, you may not use Automake for your
> package,
> but that means there would need to be a stricter test in Automake for
> the version string.
> 
> My current recommendation on this, since it's a warning only, is to
> either ignore it, or use -Wno-syntax to silence it for now.  WDYT?

Indeed, I'd like to hear Bruno's response given this additional
insight into why the warning was added, before making any changes
(whether documenting the current behavior, or changing the
behavior to bless space and/or parenthesis in version strings).

-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org



reply via email to

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