Install the gcc, g++, binutils, autoconf and make packages. They will probably be needed. It the ./configure program says that you are missing a package, install the package and the package-devel version as well. Compiling from source, the header files for the package may be needed. The devel package also supplies the static library version as well.
rpm -ql libjpeg
jschiwal@hpmedia:~> rpm -ql libjpeg-devel
Before installing a source package, use rpmdrake and see if there is a mandriva package available already. That can save you a lot of work and can avoid problems if the package you are compiling wants different versions of your libraries.