mercurial and git (was: [AC21.5] Configure uses sed -rn ... not any more!)