something like this
cd to php source directory
./configure --with-oci8=$ORACLE_HOME (and the other options you require
- there will be a README to read)
make
make install
just start googling on how to compile PHP for oracle, this will get you tons of results, you'll just have to dig