Well that's generated code which anybody would have a hard time understanding.

The idea is that it uses a minimal source file containing a certain function from Guichan and then tries to compile and link it, checking if any error occurs. It should work for Guichan 0.3.0, it won't for any older version.
There's not much we can do about it because all we did was specify the following check in configure.ac:
AC_CHECK_LIB([guichan], [gcnGuichanVersion], ,
AC_MSG_ERROR([ *** Unable to find Guichan library (guichan.sf.net)]))
If you think nothing is wrong with your environment, you can try taking out the check completely and cross your fingers while you run make. Probably better is to check config.log to find out why ./configure fails on this test.