I have run into this compiling Xine in Debian and Ubuntu. See if you have the file /etc/ld.so.conf
If you do add this line to the file:
/usr/local/lib
If you don't, create your own ld.so.conf file in /etc with the line:
/usr/local/lib
Then as root run the command
ldconfig
Now compile xine-ui and it will be able to find the xine-lib that you compiled and is installed at /usr/local/lib
You may want to read this from the xine faq:
http://xinehq.de/index.php/faq#AEN66
I hope this works for you, Xine is a very nice media player.