Hi,
do you try to compile stuff on Solaris ?
Try to add the path to the mysql lib directory to the LD_LIBRARY_PATH prior to executing configure (and execute make distclean before executing configure again).
Also make sure that there is a shared version of the mysql client library available (if it doesn't exist you might need to recompile MySQL with --enable-shared).
If that doesn't help you might try to add the mysql library to the libraries variable in the Makefile after executing configure.