Magnus:
Okay, so here's the revised version. What's new this time:
* Overriding of tools is only supported on the command line. If user
types e.g. "CAT=miaow configure", this will result in a warning (and
cat being detected normally). "configure CAT=/bin/woof", otoh, will
use the provided value instead of searching. (And "configure
CAT=missing" will search the $PATH for a binary named "missing", and
use that if found).
* If the user specifies an override that does not match a real tool,
e.g. "configure NOSUCHTOOL=broken", then the configure script will
report this as an incorrect argument error.
* Variables that can be overrided in this manner are published in the
help, using AC_ARG_VAR (thanks Mike for the idea!)
* I have added the greadlink alternative for READLINK from Mike's patch.
* The tool setup code is considerably rewritten, to collect all actual
work in a "workhorse" function, with thin wrappers providing the
external API. This enabled removing of some unneccessary code
duplication.
WebRev:
http://cr.openjdk.java.net/~ihse/JDK-8031759-better-overriding-of-tools-in-configure/webrev.03
Looks good to me.
Tim