[prev in list] [next in list] [prev in thread] [next in thread] 

List:       autoconf-bug
Subject:    Re: if optimization and eating trailing whitespace with dnl
From:       Eric Blake <ebb9 () byu ! net>
Date:       2009-12-28 13:41:06
Message-ID: 4B38B572.6010708 () byu ! net
[Download RAW message or body]

-----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             ebb9@byu.net
-----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-----



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic