We'll assume /usr/src as top of the build tree and apache_1.3.17, php-4.0.3pl1 and mod_perl-1.25.
The first step is to prep the apache source tree for php and mod_perl. Both php and mod_perl need to install files into the apache source tree, but you have to start the apache build process before you can install either mod_perl or php.
Inside /usr/src/apache_1.3.17/ run the configure script with your prefix.
[michaelc@linux apache_1.3.17]$ ./configure \
--prefix=/your/apache/prefix
Then, inside /usr/src/mod_perl-1.25 build mod_perl with the following
[michaelc@linux mod_perl-1.25]$ perl Makefile.PL \
APACHE_SRC=../apache_1.3.17/src \
DO_HTTPD=1 \
USE_APACI=1 \
PREP_HTTPD=1 \
EVERYTHING=1
The important part here is the PREP_HTTPD=1 part. Normally, the modperl installation script tries to compile apache for you. This stops that feature so you can compile and install both mod_perl and php before compiling apache yourself.
Then, make and make install.
You will also need to make sure all the perl mudules are installed that are required to run scoop. See the scoop INSTALL file for more info.
Next its php, so inside the php build directory compile php with
[michaelc@linux php-4.0.3pl1]$ ./configure \
--enable-track-vars \
--with-mysql=/usr/local \
--with-apache=/usr/src/apache_1.3.17
The interesting option here is with-mysql=/usr/local. php wants to use its own set of mysql libraries. Since you are also using perl to access mysql, you must tell php to use mysql libraries. I set this to the directoty where lib/ exists. Adjust this to match your environment
Again, make and make install.
Then, go back to the apache build directory and run the full install process.
[michaelc@linux php-4.0.3pl1]$ ./configure \
--prefix=/var/www \
--activate-module=src/modules/php4/libphp4.a \
--activate-module=src/modules/perl/libperl.a
And of course, make and make install.
for php you may also need to copy php.ini-dist to /usr/local/lib/php.ini from the php build directory.
Hope this helps folks. Constructive criticism welcome.
mike