[ expat-Patches-458907 ] config.h appears to be unused

noreply@sourceforge.net noreply@sourceforge.net
Sun Jun 2 02:16:04 2002


Patches item #458907, was opened at 2001-09-05 23:20
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=310127&aid=458907&group_id=10127

Category: Build Control
Group: None
Status: Closed
Resolution: Rejected
Priority: 5
Submitted By: Martin v. Löwis (loewis)
Assigned to: Greg Stein (gstein)
Summary: config.h appears to be unused

Initial Comment:
To compile expat as part of another package (e.g. 
PyXML), the expat configure might not have been run. 
For that kind of application, it is necessary to wrap 
each occurrence of config.h into HAVE_CONFIG_H; the 
attached patch does that.

While trying to figure out which of the defines are 
needed, it appears that none of them are (i.e. HAVE_ 
is never used). For stand-along compilation, I found 
that only VERSION, XML_NS, XML_DTD, XML_BYTE_ORDER, 
and XML_CONTEXT_BYTES must be defined. Is that 
impression correct?


----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2002-06-02 11:15

Message:
Logged In: YES 
user_id=21627

Can you elaborate which defines of  expat_config.h is used
in xmlwf? I could not find any.

Why is it wrong to not run configure? autoconf packages,
historically, always supported "manual" configuration, by
editing config.h manually. Also,  your own build process
does not use expat_config.h if COMPILED_FROM_DSP is set. In
general, it is not possible to run configure if you don't
have /bin/sh on a system; this is a scenario that PyXML
needs to support.

Also, traditionally, autoconf supports both configuration
with and without a config.h; files including config.h would
always wrap this with a

#ifdef HAVE_CONFIG_H

(should be HAVE_EXPAT_CONFIG_H in your case).

All I'm asking is that the combination "manual
configuration" and "no config.h" is supported. If this is
not available, I have to fake-generate a config.h, which is
ugly.

It would also help if config.h was reduced to the set of
defines which are actually used, instead of autoconfiscating
every line of the source.

----------------------------------------------------------------------

Comment By: Greg Stein (gstein)
Date: 2002-06-02 01:44

Message:
Logged In: YES 
user_id=6501

We may not use most of those (autoconf creates them as part
of searching for particular functions and stuff), but xmlwf
does use some.

That said: if you're going to embed Expat into another
application, then you'll need to adjust things accordingly.
Note that we've switched to "expat_config.h", so it might be
possible to just include that into your own application
since a conflict on config.h won't occur any more.

Also, note that the premise of "not running configure" is
probably quite wrong. Expat is embedded into the ASF's
apr-util project, and we *do* run configure for that, and
build expat as a sub-library. (heck, we even run expat's
buildconf.sh at the appropriate time)

Given the change to expat_config.h, and how I believe
embedding should work, I'm going to close this patch as
rejected. However, even with that said, I'm quite happy to
be corrected and/or to make other changes to simplify
Expat's ability to be embedded.

----------------------------------------------------------------------

Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2002-05-31 06:10

Message:
Logged In: YES 
user_id=3066

Greg, can you please respond to this?

----------------------------------------------------------------------

Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2001-11-09 05:48

Message:
Logged In: YES 
user_id=3066

It certainly looks like it can be reduced and possibly
removed; I'll read up on a few of the autoconf things before
removing it completely.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=310127&aid=458907&group_id=10127