[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AS_IF optimization (was: AC_TRY_COMPILE() annoyances with 2.63b)
From: |
Eric Blake |
Subject: |
AS_IF optimization (was: AC_TRY_COMPILE() annoyances with 2.63b) |
Date: |
Tue, 07 Apr 2009 06:10:13 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.6.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Andreas Schwab on 4/7/2009 3:47 AM:
>>From the autoconf manual:
>
> There are shells that do not reset the exit status from an `if':
>
> $ if (exit 42); then true; fi; echo $?
> 42
>
> whereas a proper shell should have printed `0'.
Which shells? Solaris /bin/sh passed this test (to my surprise, since if
fails the similar test for 'case `false` in *);; esac'). Even cygwin's
super-old ash passed this, although it falls flat on a number of other
constructs. Could this be a case of urban legend?
To further reinforce my point, the autoconf testsuite currently has a test
of 'AS_IF([false]) && ...', but AS_IF currently omits the unused else
branch for that construct. So if there really is such a shell that
botches the status after an omitted else, then it should trigger a
testsuite failure in at least 2.63b.
- --
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
iEYEARECAAYFAknbQqUACgkQ84KuGfSFAYDbDACfQ8FNFjH3r82XtckHyLxFFRhw
i9sAoLUg7oNwFCgY3CITtiaAjzisf2vn
=/K+9
-----END PGP SIGNATURE-----
- Re: AC_TRY_COMPILE() annoyances with 2.63b, (continued)
- Re: AC_TRY_COMPILE() annoyances with 2.63b, Mike Frysinger, 2009/04/05
- Re: AC_TRY_COMPILE() annoyances with 2.63b, Eric Blake, 2009/04/06
- Re: AC_TRY_COMPILE() annoyances with 2.63b, Mike Frysinger, 2009/04/06
- Re: AC_TRY_COMPILE() annoyances with 2.63b, Ralf Wildenhues, 2009/04/06
- Re: AC_TRY_COMPILE() annoyances with 2.63b, Mike Frysinger, 2009/04/06
- Re: AC_TRY_COMPILE() annoyances with 2.63b, Eric Blake, 2009/04/06
- Re: AC_TRY_COMPILE() annoyances with 2.63b, Ralf Wildenhues, 2009/04/07
- Re: AC_TRY_COMPILE() annoyances with 2.63b, Ralf Wildenhues, 2009/04/07
- Re: AC_TRY_COMPILE() annoyances with 2.63b, Mike Frysinger, 2009/04/07
- Re: AC_TRY_COMPILE() annoyances with 2.63b, Andreas Schwab, 2009/04/07
- AS_IF optimization (was: AC_TRY_COMPILE() annoyances with 2.63b),
Eric Blake <=
- Re: AS_IF optimization (was: AC_TRY_COMPILE() annoyances with 2.63b), Andreas Schwab, 2009/04/07
- Re: AS_IF optimization, Eric Blake, 2009/04/07
- Re: AS_IF optimization, Eric Blake, 2009/04/10
- Re: AC_TRY_COMPILE() annoyances with 2.63b, Eric Blake, 2009/04/10