Para compilar PHP básicamenente son tres pasos...
Código:
// Configuras PHP con los módulos que vas a utilizar
./configure '--with-mysql' '--with-apxs' '--with-interbase'
'--with-magic-quotes' '--with-ibm-db2' y todos los módulos que quieras
make
y por último si el make no ha fallado
make install