httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (Ralf S. Engelschall)
Subject Re: APACI: Commit Strategy
Date Sat, 28 Mar 1998 11:03:08 GMT

In article <> you wrote:

>> But nevertheless on the weekend I will go to at least all major Unix platforms
>> I've access to and again proof that APACI works out-of-the-box without
>> problems. Because I really want to avoid last minute problems. If it
>> successfully passes all of these real-live tests, I'll commit it on Sunday or
>> Monday. Then we should all test a few days more to be sure it works fine and
>> then I think we should really consider rolling 1.3b6 out.

> Ralf, I have been playing around with your APACI stuff a bit.  Haven't
> gotten too deep into it yet.  But a quick question.  What is wrong with
> this?

> 12:52am asf:~/apache-1.3> ./configure --prefix=/tmp --add_module=src/modules/extra/mod_php3.c
> Now, this is broken because there is a mod_php3.module file sitting 
> in src/modules/extra and it would normally show up in the "adding selected
> modules" section.  Do .module files and APACI not get along, or what am I
> doing wrong?

> In fact, mod_php3.c isn't even getting compiled here.

Just a few hints, Rasmus:

1. The --add-module is named --add-module and not --add_module.
   But my fault that APACI didn't complain. I've fixed this, now
   APACI cmplains with
     configure:Error: invalid option '--add_module=src...'

2. The --add-module is for on-the-fly _ADDING_ a module
   to the source tree by copying it from the given argument to the
   src/modules/extra/ directory and activating it in the configuration. This
   is for single-source stand-alone modules. Advanced modules like mod_perl
   and mod_php cannot be easily added this way because there is no general
   rule which files have to be copied.  For such complex modules you have to
   copy it yourself to src/modules/ (as you did). But then you have to just
   use --enable-module=pgp3 because the stuff is already there and just has to
   be enabled for the configuration (assuming your have created an entry
   in the Configuration, too).

3. For modules to show up in the "adding modules" section they
   have to be enabled in the configuration. And this is done
   via --enable-module=<NAME>.

4. Currently the situation where the module was copied to the
   Apache source tree but the Configuration was not extended for it is not
   supported. --add-module is for copying and extending the Configuration
   while --enable-module is for just enabling an already existing and
   configured module. To support your PHP3 approach and similar ones, I've
   now added an intermediate option named --activate-module. 
   Now modules authors have three choices which should provide maximum
           module NAME has to exist under src/modules/*
           and an entry already has to exist in src/Configuration.tmpl.
           (standard way for distributed modules)
           module source FILE has to exist under src/modules/ and the entry
           for the Configuration is automatically determined and added
           on-the-fly. This is equal to adding the entry plus --enable-module.
           (the way for modules like PHP3 and mod_perl)
           nothing exist in the source tree. The FILE is on-the-fly copied to
           src/modules/extra/ and the Configuration entry is automatically
           determined and added on-the-fly. Is equal to
           copying the source plus --activate-module.

Ok, with the current APACI you can compile and install Apache with PHP3 as

$ cd php-3.0RC
$ ./configure --with-apache=../apache-1.3
$ gmake
$ gmake install
$ cd ../apache-1.3
$ ./configure --prefix=/tmp/apache \
$ make
$ make install

And mod_perl can be used in a similar way:

$ cd mod_perl-1.09
$ perl Makefile.PL
ReadLine support enabled
Configure mod_perl with ../apache-1.3/src ? [y] y
Shall I build httpd in ../apache-1.3/src for you? [y] y
$ cd ../apache-1.3
$ LIBS='`perl $(SRCDIR)/modules/perl/ldopts`' \
  ./configure --prefix=/tmp/apache \
$ make
$ make install

BTW: The PHP 3.0RC looks great. I just had one problem under
     FreeBSD: Your makefiles run only with GNU Make, not with plain BSD make
     because the compilation of the functions/xxx.c cause problems: Your
     target for compiling is not recognized.

PS: For compiling mod_php3 as a shared object I think it would
    be good to not put php3 into modules/extra/. Instead you should put it
    into modules/php3/ as mod_perl does and then provide a Makefile.tmpl and
    Makefile.libdir similar to the one I recently posted for mod_perl which
    contains shared object support. Or look at the current
    modules/proxy/Makefile.tmpl as an example. This way one even could use
    --enable-shared=php3 which would be useful (you have to compile your
    sources itself with PIC) ;-)

                                       Ralf S. Engelschall

View raw message