The problem arises when I attempt to configure PHP 5.0.2 from source. I'm trying to specify the version of MySQL to use by specifying to configure:
./configure --with-mysql=/usr/local/mysql4 --with-mysqli=/usr/local/mysql4/bin/mysql_config
But configure errors out with:
checking for mysql_set_server_option in -lmysqlclient... no
configure: error: wrong mysql library version or lib not found. Check config.log for more information.
Looking at config.log reveals that configure is attempting to link to MySQL using a command like:
gcc -o conftest -g -O2 -R/usr/local/lib/ -L/usr/local/lib -R/usr/local/mysql4/lib/mysql -L/usr/local/mysql4/lib/mysql ...
I believe the problem is that configure is searching /usr/local/lib before it searches /usr/local/mysql4/lib/mysql, and so it is linking with the older MySQL 3.23 libraries. It seems to prepend /usr/local/lib to the library search path between the check for mysql_close and the check for mysql_set_server_option. I'm not sure why.
Does someone know of a way to convince configure to keep /usr/local/mysql4/lib/mysql before /usr/local/lib in the search path, so it will find the right libraries?
Thanks,
--Stuart A. Malone Llamagraphics, Inc.