[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Apache + Static modules from source build with mod_perl?



On Apr 6, 2005 2:55 PM, John Brahy <john_(_at_)_brahy_(_dot_)_com> wrote:
> I have found out that if I modify the Makefile.bsd-wrapper I can add modules
> to be included in the apache part of the system during a recompile. I would
> like to stay with the OpenBSD version of Apache but I would also like to
> have perl statically linked to my httpd binary.
> 
> Is this supported in OpenBSD builds? If so, what is the official way to do
> it? If not, does anyone know of a hack to make it work?

I havent linked perl in statically, but jumped the same hoops just
recently to get php in the OpenBSD httpd binary though. The
process is essentially the same of building individual items out
of a writable source tree. The below was the hack job way that
I recently did it- hope its helpful for others. The only reason
why I justify doing it is the performance gain for perl and php
is quite substantial.

cd /usr/src/usr.sbin/httpd
rm -rf ./obj; rm -f ./config.status
make -f Makefile.bsd-wrapper obj
make -f Makefile.bsd-wrapper cleandir
make -f Makefile.bsd-wrapper depend

/* substitute the following php part for mod_perl/whatever */

cd /home/php-src-4.3.8/
./configure --with-apache=/usr/src/usr.sbin/httpd && make && make install

cd /usr/src/usr.sbin/httpd

# edit Makefile.bsd-wrapper, adding your module
# i.e for php I added:
#  --activate-module="src/modules/php4/libphp4.a"
# at the end of the module list

rm -f ./config.status
cd /usr/src/usr.sbin/
make httpd
cd /usr/src/usr.sbin/httpd
make -f Makefile.bsd-wrapper install

I still keep php installed from ports though so that I can keep 
building modules from ports/packages.


-Karsten



Visit your host, monkey.org