If you don't have this library installed, your PHP5 ./configure script will die with a line something like this:
xml2-config not found. Please check your libxml2 installation
This isn't a major problem.. All you have to do is find libxml2 and install it first. Hopefully the next few lines will make that quick and easy for you:
sudo wget ftp://xmlsoft.org/libxml2/libxml2-2.6.28.tar.gz sudo tar -zxvf libxml2-2.6.28.tar.gz cd libxml2-2.6.28/ ./configure make sudo make install
if you don't have 'sudo' on your system, just omit the word 'sudo' from those commands, but make sure that you run them as root instead. One other caveat is that libxml2 might be at a higher version by the time you read this article, so to be sure, just point your browser or ftp client at ftp://xmlsoft.org/libxml2/ and check the latest build versions first
You are now ready to go back and configure PHP5.
hope that's useful
follow me on twitter http://twitter.com/planet_guru