./configure --prefix=/usr/local/php --enable-fastcgi  --enable-force-cgi-redirect --enable-fpm  --with-libxml-dir --with-zlib --enable-bcmath  --with-curl  --enable-ftp --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir  --enable-gd-native-ttf --enable-mbstring --with-mcrypt --with-mhash --with-mysql --with-mysqli --with-iconv-dir=/usr --enable-zip

1. checking for mysql_close in -lmysqlclient… no
    checking for mysql_error in -lmysqlclient… no
    configure: error: mysql configure failed. Please check config.log for more information.

看看config.log提示的错….哦.原来是版本有问题.想起我的系统都是X86_64的,lib都是64位的.所以解决方法很容易.
这个libmysqlclient.a library 是在 /usr/lib64/mysql, 不是在 /usr/lib/mysql.
所以可以做下面的方法来解决

解决:#export LDFLAGS=-L/usr/lib64/mysql

2. configure: error: Cannot find libmysqlclient under /usr.
    Note that the MySQL client library is not bundled anymore!
通过查找libmysqlclient,发现是在/usr/lib64/mysql/目录内的libmysqlclient.so.16.0.0做的软连接,PHP默认是去的 /usr/lib/搜索,所以没有找到.找到问题了就好解决
解决:cp -rp /usr/lib64/mysql/libmysqlclient.so.16.0.0 /usr/lib/libmysqlclient.so