For Mandrake 10.1 forget building the libraries from source - it's a lot of hard work when there's a far easier solution.
Configure your download sources through easy urpmi: http://easyurpmi.zarb.org/
then use those sources and download the latest .rpm files.
Rpmdrake will sort out all the dependencies and install the libraries to the correct directories and sort out your database at the same time.
You might have a lot of the development software on your install CD's/DVD's too, which you can also install using rpmdrake - worth checking out if you've got a slow connection, but I'd still download the latest .rpm's.