-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Mike Frysinger on 4/14/2009 8:11 PM: > well, is there any real need to preserve the exit value of the if statement ? > > in other words, past implementations of autoconf didnt preserve it and it > isnt > like anyone complained. the old generated code:
for AC_TRY_COMPILE, but not for other clients of AS_IF > ....... > else > echo "$as_me: failed program was:" >&5 > sed 's/^/| /' conftest.$ac_ext >&5 > > <stuff from user 4th arg -- $? is now set to exit value of `sed`, not > the if> The AC_RUN_IFELSE test in the testsuite if a valid test that showed someone caring about the exit status: AC_RUN_IFELSE([AC_LANG_PROGRAM([], [return 2])], [AC_MSG_ERROR([saw `return 2' as a success])], [estatus=$? test $estatus != 2 && AC_MSG_ERROR([did not get as 2 exit status: $estatus])]) When running a test program, you really can care about $?, more than just the fact that you hit the else branch of the AS_IF. - -- Don't work too hard, make some time for fun as well! Eric Blake e...@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 iEYEARECAAYFAknlRiEACgkQ84KuGfSFAYB4JwCeJWmD9evGI7ZhFqv27McI/2rx nl0AoKOIRcxV+R62/chriojOYhLuhs3/ =Ox6l -----END PGP SIGNATURE-----