Cross compiling with autoconf

Anybody tried to cross-compile a program using autoconf. I was looking at this documentation. The configure succeeds but running make seems to invoke the wrong gcc/g++. It fails with mingw32-make as well. The configure line I used was:

./configure --build i686-pc-linux-gnu --host mingw32

The code in question is available here:

Looks like switching to cmake is the easiest path forward. I have it building now. I still need to finish up the install target.