I install mysql from source, with its default prefix of
/usr/local which puts headers in
/usr/local/include/mysql and libraries in
/usr/local/lib/mysql, but when I configure with
--with-mysql=/usr/local, it looks for headers in
/usr/local/include and compilation fails. I fixed it by
changing lines 332-333 of the configure script to:
Maybe you could make it autodetect in future versions.