On line 20122 of the current configure script, you have:
This, of course, completely messes up the LIBS environment override if it's necessary. As it is for cross-compiling against static libs.
It comes from line 776 of configure.ac - please remove it :)
use LDFLAGS to add what you want, you should not need to set LIBS yourself.