This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [UPDATE] apache-1.3.29-1 ready for testing and upload


Stipe schrieb:

>> In the relevant Configure part is LIBS="$LIBS -lexpat" defined which is
>> not needed here, instead of LIBS there should be this (and CFLAGS which
>> is entirely missing here, what a stupid bug):
>> 
>>         EXPATLIB=" -lexpat"
>>         CFLAGS="$CFLAGS -DUSE_EXPAT"
>> 
>> Complete excerpt from Configure:
>> 
>> if [ "x$RULE_EXPAT" = "xyes" ]; then
>>     if ./helpers/TestCompile lib expat; then
>>         echo " + using system Expat"
>>         EXPATLIB=" -lexpat"
>>         CFLAGS="$CFLAGS -DUSE_EXPAT"
>>     else
>>         if [ ! -d ./lib/expat-lite/ ]; then
>>             echo "ERROR: RULE_EXPAT set to \"yes\" but is not available."
>>             exit 1
>>         fi
>>         echo " + using builtin Expat"
>>         EXPATLIB="lib/expat-lite/libexpat.a"
>>         APLIBDIRS="expat-lite $APLIBDIRS"
>>         CFLAGS="$CFLAGS -DUSE_EXPAT -I\$(SRCDIR)/lib/expat-lite"
>>     fi
>> fi

> to be honest, I still don't get it. ;)

> I didn't patch this piece of code. Hence it should be failing on _all_
> platforms. And to be honest I don't believe it does ;)

And I'm not so sure about it.

> My interpretation is that the CFLAGS is set to indicate that the
> internal bundled version is picked and within the code (espacially for
> the WIN32 defines sections) you'll have to react differently.

USE_EXPAT is only used in http_main.c and if it is not used there, the
header xmlparse.h is never included and the comment suggests that Expat
is not linked in when USE_EXPAT isn't defined:
/* force Expat to be linked into the server executable */

I guess usually one never knows if the target system has a shared
libexpat handy and so they always build it using the bundled expat-lite
source.  It works if there is no system expat library at the build
sysytem and if you want ./Configure to use the system Expat then one
needs to define USE_EXPAT and EXPATLIB explicit in the target specific
sections (most probably this is the way it is done), so don't care about
the generic section, just define the two flags or use the bundled
expat-lib (means remove the expat installation from your build system,
but why define it again when we have a shared libexpat).

If you ask me, this is a Configure bug!


Gerrit
-- 
=^..^=


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]