if test "${startperl:0:1}" = "#" ; then
startperl="\\$startperl"
fi
This results in an error:
checking for perl... /nix/store/6qvjjaywj6qf8jn9splpiz9qap01w36w-perl-5.16.3/bin/perl
./configure: 2264: ./configure.lineno: Bad substitution
builder for ‘/nix/store/nk9y51xlzsbkhswc5cpl3hkryg2xw85g-atool-0.39.0.drv’ failed with exit code 2