bug-autoconf
[Top][All Lists]
Advanced

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

Re: if optimization and eating trailing whitespace with dnl


From: Eric Blake
Subject: Re: if optimization and eating trailing whitespace with dnl
Date: Mon, 28 Dec 2009 06:41:06 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Mike Frysinger on 12/26/2009 10:58 AM:
> the lcd4linux package uses a common construct like so:
> 
> AC_INIT
> if :; then
>         AC_MSG_RESULT([no])
>         AC_MSG_ERROR([blah blah blah
> blah blah
> ])dnl
> fi
> AC_OUTPUT

The dnl is spurious if the package wants to be portable to a range of
autoconf versions.  I don't see how this particular snippet could have
ever worked - even back in 2.63, prior to AC_MSG_ERROR being rewritten to
call a shell function instead of always being a grouping command, it was
never valid shell to use

if :; then
AC_MSG_ERROR(...)dnl
fi

because that would expand to:

if :; then
{ ... ;}fi

Are you instead complaining about an interaction between AS_IF and
AC_MSG_ERROR?  At any rate, I don't think anything in autoconf needs to
change; rather, this package should fix their own bug by doing what you
already mentioned:

> if the dnl is dropped, or a newline is added before the fi, then the 
> generated 
> script works fine.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAks4tXIACgkQ84KuGfSFAYDocQCdERS0WgfjHsWtEAI41mK7euWK
bUoAoIYhz2X+oe+K2wTYLjV7pQFsTEWM
=zsJ9
-----END PGP SIGNATURE-----




reply via email to

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