Zaheer
for Lynux
I'll briefly go through the procedure for Linux.
Install Mesa (if you have redhat 5.x then RPMs are available from ftp://contrib.redhat.com) in the .tar.gz file there are instructions on how to install it when you untar it.
change the Makefile of the code to use -lMesaGL instead of -lGL and same with all the other GL libraries.
That should be it...
If you want a step-by-step guide on this, i can simulate an install and show all command line stuff and output.