That's right.
If you want to install php as shared module (libphp4.so) you have to compile and install apache with dso support enabled first. After that compile php with the configure switches you want including --with-apxs=/path/to/apxs (including the apxs binary). After that you have to add the following lines to your httpd.conf:
LoadModule php4_module /path/to/libphp4/libphp4.so
(at the end of the LoadModule block)
AddModule mod_php4.c
(at the end of the AddModule block)
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps
(somewhere below the AddModule block)
Make sure that the apache init script points to your newly installed apache server or execute /path/to/new/apache/bin/apachectl start to test your newly installed apache.