Eh..
I do not know what Ingmar Gebert meant by that last post, but I understand where you stand, Pavils.
Do you want to compile php on linux??
D/l the tarball for php, and read the INSTALL file... Very informative...
And on the man pages for php on php.net you can find all of the "configuration directives" you need. (for gd etc etc..)
Then custombuild your php with the configurecommand, by extracting the directives you need from the manual.
The install file in php also describes how to incorporate php with apache/mysql...
good luck.