httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralf S. Engelschall" <...@engelschall.com>
Subject Re: cvs commit: apache-2.0/src Configure
Date Wed, 22 Dec 1999 19:19:03 GMT

In article <Pine.LNX.4.10.9912220950550.24830-100000@hapkido.raleigh.ibm.com> you wrote:
> 
>> BTW, will non-system thread libraries like Pth even work with 2.0
>> right now?  I'm mostly worried about APR, because I don't know if
>> anyone has had the time to implement that yet.
>> 
>> The autoconf setup in Apache has the same problem. PHP4 seems to let
>> you choose pthreads, Pth, or whatever. I guess it wouldn't be hard to
>> make the pthread-checking macro also support --with-pth.
> 
> The proper solution, is to add a Pth library for APR.  APR has been setup
> to allow for building with a different threading library.  Nobody has
> implemented the APR layer for a threading library other than pthreads, so
> APR's configure only recognizes --enable-threads=pthread or
> --disable-threads.  If we ever get around to putting Pth into APR, we'll
> also support --enable-threads=pth.

Errr.... you actually don't have to use the native Pth API.  It's fine if
Apache 2.0 uses Pth's Pthread API (which is an API also provided by Pth which
already provides a mapping from Pthreads to native Pth API). So, the problem
for APR is not the use of the Pthreads API (Pth implements here actually most
of the stuff). The problem is just that hardcoding things like -pthread is
wrong, because for using Pth you need 

$ CFLAGS="`pthread-config --cflags`" \
  LDFLAGS="`pthread-config --ldflags --libs`" \
  ./configure

which usually conflicts with a hard-coded -pthread. So all which Apache 2.0
has to do is to be more flexible in choosing the Pthread library. Using
-pthread should be only a _fallback_, but not the default.

                                       Ralf S. Engelschall
                                       rse@engelschall.com
                                       www.engelschall.com

Mime
View raw message