I\'m trying to compile a new instance of PHP (5.4.0) from the source code and want to keep compatibility with the one (PHP 5.3.6-13ubuntu3.6) already installed from the dist
There should be a script php-config you can install on ubuntu to get the configure parameters used for php.
sudo apt-get install php5-dev php-config --configure-options