Sorry to be a curmudgeon, but I don't see an advantage to merely dynamically synthesizing the static list of versions. If anything, I think statically listing everything in text is clearer and less error-prone.
What would be an improvement is to not to have this list of versions at all. I guess we could consider each element of PATH in turn, looking for executables named python\d\.?\d+ (something like that), but it seems fragile not to use AC_PATH_PROGS. Dealing with .exe, sorting the resulting possible set of names correctly ("by reverse version"), and other niggling details. So I guess in the end my inclination is to leave bad enough alone. Might as well close this. Thanks to everyone for the input. Karl P.S. As for Python 4: no, I was not being facetious about Python's demonstrated lack of interest in compatibility. It doesn't seem like it would hurt anything much to add python4 and python4.0, but I'm content to never mind that, and await developments.