configure runs tests with wrong tools for --host if suitable tools are not in $PATH

Trying to build Tor 0.2.5.x with a cross-compiling toolchain and ./configure --host=arm-unknown-linux-gnueabihf, the build process stops with the following error (followed by a number of warnings about bitshifts exceeding type width):

CC src/ext/curve25519_donna/src_common_libcurve25519_donna_a-curve25519-donna-c64.o

src/ext/curve25519_donna/curve25519-donna-c64.c:35:1: error: unable to emulate 'TI'

typedef unsigned uint128_t attribute((mode(TI)));

curve25519-donna-c64.c is the curve25519 implementation for 64 bit platforms and shouldn't be built for arm.

Trac:
Username: sqrt2