These instructions you have posted are from compiling from source — which is a perfectly valid way to install a program, but not always the easiest, especially when you have lots of dependencies to deal with.
My advice, if you just want to get something that works, is to go to http://www.rpmfind.net
(or your original install disks) and search for an RPM for whatever you're installing. You can then install it with something like:
rpm --install gift-1.2.3-i586.rpm
It will tell you if you need to install anything else first. In which case, just repeat the process for whatever else you need to install (although there are also some tools that will do this for you).