So, your patch needs more work, either in autoconf.texi (documenting
that LN_S needs to be set in the environment rather than on the
configure command line) or we need to think or some other way to
fixup the _AS_LN_S_PREPARE result after command-line parsing, or
restructure the code otherwise.
The below one-liner makes the tests pass. I don't know if we should
perhaps use test "${LN_S+set}" = set instead, and I don't know if it's
ok to clobber as_ln_s from "the outside" like this. I also suppose
there's an area of the configure script that will run with unexpected
outcome of any AS_LN_S([foo], [bar]) macros (between the _AS_LN_S_PREPARE
expansion and AC_PROG_LN_S, at least as long as _AS_LN_S_PREPARE is
expanded first but that seems pretty hard to change).