I have compiled apache 2.2 with php5 and after uncommenting loadmodule line for php in apache conf file the php started but as a shared module so is there any way to compile it as static ?
Short answer : No
Long answer : Never heard of someone trying to compile php inside httpd, and I can't figure out why someone would want to. In production, I highly recommend using official binary packages provided by debian or redhat.
Using apache prefork + php5.so is fine. Further optimisation can include php fpm, apc, varnish etc ...