The test `cd "$srcdir" && ls -1t configure configure~ | head -n 1` = "configure" in src/configure.in seems unreliable. If the current kernel's stat() doesn't support nanoseconds or ls doesn't compare them, the test fails if the modification times of both files are in the same second, which can happen if src/run_autoconfig --no-recurse is triggered.
Perhaps if you use a file name that lexically precedes "configure", such as "config-time-test", instead of "configure~".