You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Greg Stein <gs...@lyra.org> on 1999/04/15 12:53:48 UTC

[PATCH] add Expat as an option

Attached is a patch (to apache-1.3) to add Expat into the core server,
for use by modules (mod_dav and mod_php have already signed up to use
this if made available). The patch adds a new RULE_EXPAT to control the
addition of Expat to the server. The rule is forced to "no" if the
src/expat/ directory is not present (this allows a distribution to
easily remove [the MPL'd] Expat if required).

It also solves the problem noted earlier (Expat was not being pulled
into httpd, making it unavailable for DSOs) by adding a stub function
into http_main.

For the Expat inclusion to work, it is also presumed that Expat's
"xmlparse.h" header is dropped into src/include/.
=> Q: should Configure also ensure that the xmlparse.h header exists? I
say "no" with the expectation that the person add/removing Expat to/from
the distribution should know better.

Note: this patch uses the same style of Makefile symbols and stuff as
the HSREGEX stuff. (the header in src/include/ and the $(REGLIB) stuff.
It may be interesting in the future to provide a more extensible way to
do this, so we don't end up with a bazillion *LIB things in the link
lines.

=> Q: what should we do if a module says RULE_EXPAT=yes, but the
directory doesn't exist? This test would be at line 1552 (of the patched
Configure); what is the "approved" way to punt from Configure with an
error?

Presuming this goes in, then I'll follow up with an appropriate
src/expat/ subdirectory patch. That's a bit different decision: do we do
nothing in the core for Expat, do we add a framework but not ship Expat
itself, or do we add the framework and Expat?

Cheers,
-g

--
Greg Stein, http://www.lyra.org/

Re: [PATCH] add Expat as an option

Posted by Greg Stein <gs...@lyra.org>.
Martin Kraemer wrote:
> 
> I like the idea of adding an XML to the base, because more and more
> add-on products will require it (maybe even the base will
> eventually).

I agree. Also, having better support for XML in Apache may also help to
spur new development directions.

>...
> I'd opt for #2: add a framework but not ship Expat

Noted, but take heed that I'll try to change your mind later :-)

>...
> > RCS file: /home/cvs/apache-1.3/src/Configure,v
> > retrieving revision 1.337
> > diff -u -u -r1.337 Configure
> > --- Configure 1999/03/30 08:58:33     1.337
> > +++ Configure 1999/04/15 09:59:57
> > -MAKEDIRS="support main ap regex $OSDIR"
> > +MAKEDIRS="support $SUBDIRS"
> 
> Am I correct in my assumption that "expat" is now (if the directory
> was found) part of $MAKEDIRS, but neither "regex" nor "$OSDIR" are?

$SUBDIRS includes main, ap, and $OSDIR. If expat and/or regex are
configured, then $SUBDIRS will include them, too.

Basically, there were two lists of subdirs: $SUBDIRS and $MAKEDIRS. I
unified the two so that it is easier to simply add to $SUBDIRS and the
Right Thing would happen. Note that just putting expat into the original
$MAKEDIRS fails when the expat subdir is missing.

Cheers,
-g

--
Greg Stein, http://www.lyra.org/

Re: [PATCH] add Expat as an option

Posted by Martin Kraemer <Ma...@mch.sni.de>.
I like the idea of adding an XML to the base, because more and more
add-on products will require it (maybe even the base will
eventually). Just like in the regex case, there should be an option
to use the bundled (or installed in the provided space) library, or
a different available library.

As the number of "plug-in libraries" like these increases, it might
be desirable to add a library-specific configuration script (as in
the module configuration case, where it can either be imbedded in
the source or provided as a separate *.module file), rather than
hard-coding each test into Configure.

> Presuming this goes in, then I'll follow up with an appropriate
> src/expat/ subdirectory patch. That's a bit different decision: do we do
> nothing in the core for Expat, do we add a framework but not ship Expat
> itself, or do we add the framework and Expat?

I'd opt for #2: add a framework but not ship Expat

    Martin

> Index: Configure
> ===================================================================
> RCS file: /home/cvs/apache-1.3/src/Configure,v
> retrieving revision 1.337
> diff -u -u -r1.337 Configure
> --- Configure	1999/03/30 08:58:33	1.337
> +++ Configure	1999/04/15 09:59:57
> -MAKEDIRS="support main ap regex $OSDIR"
> +MAKEDIRS="support $SUBDIRS"

Am I correct in my assumption that "expat" is now (if the directory
was found) part of $MAKEDIRS, but neither "regex" nor "$OSDIR" are?

Otherwise, this looks like a very good start.

    Martin
-- 
<Ma...@MchP.Siemens.De>      |        Siemens Information and
Phone: +49-89-636-46021               |        Communication  Products
FAX:   +49-89-636-47816               |        81730  Munich,  Germany