You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Randy Terbush <ra...@zyzzyva.com> on 1996/04/09 20:05:36 UTC

Re: conditional HTML

> 
> Thanks for the pointers. I'll take a look later.
>  
> What I wanted to experiment with is to call a SSI 
> cgi only when a particular cookie is present.
> 99% of the time the cookie wouldn't be present and the CGI call would
> waste time, so a conditional SSI would solve the problem for me.
> 
> If anyone has any tricks that'd help here, I'd love to hear from you.

Take a look at the following attachment. I am pretty sure that
I mailed notice of this to the list a couple of weeks ago.
Sounds like what you are looking for.





Re: conditional HTML

Posted by Tom Tromey <tr...@creche.cygnus.com>.
Randy> One thought that I have had in the back of my mind is to split
Randy> the modules into their own directory. Teaching configure to
Randy> build a list from the modules in this directory, and perhaps a
Randy> --with tag to point it to a directory full of local modules
Randy> would do the trick.

Solving the "modules problem" turns out to be hard.  At least, no one
seems to have come up with a really good solution yet.

* Python does essentially what my modified Apache does -- there is a
modules file you edit before configuring and building.

* Guile has a separate subdirectory for each module.  Any
subdirectories present at configure time are configured and compiled
in.  Guile modules tend to be fairly heavyweight.

* Tcl pretty much lets modules fend for themselves.  Each new module
requires relinking the main application.  At least, this is the case
if you don't have dynamic loading capabilities.

Dynamic loading presents a good solution for machines that have it.
All modules (including extension modules) can be compiled and
installed; modules are loaded on demand.  Yes, I know about Apache's
dld module.  dld isn't portable enough to be a good solution.

The problem with using --with options to configure is that it doesn't
scale well to a large number of modules.

Right now, you can drop mod_foo.c into the src directory, edit it into
Modules, and it will be automatically handled.  The only problem is
that non-core modules with their own portability requirement will
either require a change to configure.in (meaning the builder must have
autoconf -- ugh), or their own configure script (which isn't handled
right now).

For now it is simpler to just ignore the problem.

Tom
-- 
tromey@cygnus.com                 Member, League for Programming Freedom

Re: conditional HTML

Posted by Tom Tromey <tr...@creche.cygnus.com>.
Rob> Patching the Makefile to get it to work is a pain. Perhaps its
Rob> mod_include.c could just #include "regexp.c"' to save that
Rob> hassle. It'd then become a standalone module...

This seems like a good place to enter: I've modified Apache (1.0.3) to
use Autoconf for configuration and and Automake to generate the
Makefiles.  (A side note: the version of Automake I've used is not yet
released.  It should be released sometime this week)

In this framework, making a change such as the above becomes pretty
easy.  For instance, the way things are set up right now, configure
will only look for -lndbm if the auth_dbm module is specified in the
Modules file.  Adding more special cases is simple.

This work is available at:

	ftp://ftp.cygnus.com/pub/tromey/apache-1.0.3.tar.gz

I'm happy to answer any questions about this work.  When 1.1 comes
out, I'll most likely be updating all the configuration stuff (we need
it to fit apache into our tree)

For those used to GNU configure, the only change here is that you must
edit the Modules file before running configure.  If you are compiling
in a non-source directory, you can copy the Modules file into your
build directory before proceeding.  This isn't ideal, but having a lot
of --with-foo options wasn't very appealing either.  I also
experimented with a --with-modules=LIST option, but that wasn't
satisfactory.  Ideas solicited.

I'm hoping, of course, that this will eventually make it into the
Apache distribution.  For those who need convincing, I can extoll the
virtues of configure, and list ways in which it is better than the
current ad-hoc system.

Tom
-- 
tromey@cygnus.com                 Member, League for Programming Freedom

PS Since it is not yet widely known, here is a little blurb about
Automake:  Automake is a tool to generate GNU-standards-compliant
Makefiles from short template files named "Makefile.am".  The intent
is to reduce the burden of Makefile maintenance to almost nil.
Although still a work in progress, Automake has been adopted by
several projects (both GNU and not).  It is available from:

	ftp://ftp.cygnus.com/pub/tromey/automake.tar.gz