-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Ralf Wildenhues on 4/28/2009 12:02 AM: >> Rather than have four consecutive copies of _AC_DO_LIMIT, wouldn't >> something more compact like this (untested) snippet work? >> >> for ac_option in --version -v -V -qversion ; do >> _AC_DO_LIMIT([$ac_compiler $ac_option >&AS_MESSAGE_LOG_FD]) >> done > > Sure. Unfortunately, it wouldn't work to check the exit status of > the command, as some don't reliably fail with an unknown argument.
Agreed, so no blind use of break within the loop, and no way to reduce the number of forks in general. On the other hand, maybe it is worth adding an exception that if the first iteration, using --version, detects gcc, then we don't need the other iterations (it is okay to make life on free systems optimal, as long as it doesn't preclude life on other systems); but special-casing gcc does not have to be part of this patch. Overall, in case I wasn't clear earlier, I like the intent of this patch, so please commit once you've converted all of four of the original linear compiler checks into loops. - -- Don't work too hard, make some time for fun as well! Eric Blake [email protected] -----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 iEYEARECAAYFAkn5m6gACgkQ84KuGfSFAYDFjwCeNqmH47bN4NUP/Pj0UclyYqgs tScAn2/dFwecvmSUevdAOOVqjilj6fQE =xBsr -----END PGP SIGNATURE-----
