Stas Bekman wrote:
> Philippe M. Chiasson wrote:
>
>>After thinkering about all the problems with my initial solutions
>>and looking a bit more closely at httpd's build system, I've come
>>up with a solution that doesn't involve any patching.
>>
>>It would be used like this
>>
>>$> perl Makefile.PL \
>> MP_USE_STATIC=1 \
>> MP_AP_CONFIGURE="--with-mpm=prefork --enable-debug [...]"
>>$> make
>>
>>The Makefile.PL runs httpd's ./configure and enables mod_perl
>>The make command will build httpd first and then mod_perl (a required
>>order)
>
>
> Excellent. That's very much like mp1 did it.
Yes indeed.
> Should we think right away about how to do the flexible build, ala mp1? So one
> can link httpd statically with mod_perl and other 3rd party modules which
> require a separate build (php?). Or should we handle that one later?
I'd put that one to a bit later, as things in httpd-2.0 land aren't as easy
to configure around. The only way to trick httpd's ./configure to build mod_perl
is by using a specific set of environment variables at configuration time.
Allowing for a more flexible build like mp1 used to offer will be a bit more
complicated without having users cut-n-paste a few environment vars.
For now, I'd leave it at this, and possibly document how to build something
like php with it.
In the meantime, I've been looking at a single possible new feature for httpd's
./configure that would allow for an even cleaner build and allow 3rd party
builds to be possible to
$> cd httpd
$> ./configure --enable-module=perl:../mod_perl/src/module/perl/mod_perl.a
$> cd mod_perl && make
$> cd httpd && make
But currently, the --enable-module= syntax of httpd isn't quite flexible
enough.
>
>>There are 2 small issues left that I can think of.
>>
>>First, should make install also install httpd ? Or maybe use another
>>configurable option MP_AP_INSTALL=1 to control it
>>
>>Second, right now, make test will only work if called like
>>
>>$> make test APACHE_TEST_HTTPD=/path/to/httpd/src/httpd
>>
>>I can't figure out how to pass this httpd location to t/TEST at
>>configure time to avoid this. Stas ?
>
>
> I guess the two are somewhat related. It has been ages since I last tried to
> test against uninstalled httpd. Does it still work at all?
No idea.
> If I remember
> correctly there were too many problems with that approach. And if that's the
> case. We may need to first install httpd, then test modperl and then install
> modperl. If there are no problems, then modperl's make install should install
> httpd as well, as it did in mp1 (plus note my question above regarding the
> flexible build).
So mod_perl's make test (or make) should install httpd then ?
> If we go with 'make test' against the source, then it's easy - we know the
> location of the source dir and we know the relative location of httpd
> executable. So just set -httpd /path/to/httpd from Makefile.PL, before
> creating t/TEST. Actually I think that we already handle that case internally
> (at least we did when we tried to make 'make test' work against the source).
Yes, that's what I thought, but I couldn't find where that magic is hapenning.
Care to point out to me, as it was the solution I wanted to try. I did it
manually just now and it does work and most test passe fine.
> If we go with 'make test' against the post-install httpd, then we have no idea
> what's the location, besides snooping on some httpd config files or using apxs
> if available. i.e. apachectl knows where httpd is located, so we should look
> at how apachectl finds it out and do the same.
>
And unless I am wrong, there should be an apxs in the build directory that knows
about httpd's to-be installed PREFIX
>>+ if ($build->do_httpd) {
>
>
> can this be $build->should_configure_httpd?
It can very well be anything you want ;-)
--
--------------------------------------------------------------------------------
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]