httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sascha Schumann <sas...@schumann.cx>
Subject Re: Solution for pthreads configure problem.
Date Wed, 22 Dec 1999 21:50:00 GMT
On Wed, Dec 22, 1999 at 05:24:23PM -0500, Ryan Bloom wrote:
> 
> > > If --with-threads=pth is specified for Apache, we use the flags Ralf has
> > > specified as necessary to build with pth.  If not, we check for
> > > libpthreads, and if it is around, we try to compile with --pthread.  If
> > > this works, we specify it in the LD_FLAGS variable. 
> > 
> >    It will not work.  Under FreeBSD, as I mentioned in a previous
> > post on this thread, there _is_ no libpthread; it's libc_r.  I
> > like Greg Stein's idea of checking whether gcc -pthread will
> > actually properly compile a threaded program, and then use that
> > if it works, or try other methods (such as attempting to link
> > with -lpthread if it exists).
> 
> Okay, I see where I went wrong.  Instead of checking for libpthread first,
> we'll check for -pthread first, and then look for libpthread.  Basically,
> it looks like this:
> 
> if (threading library specified as pth)
>   setup variables Ralf has specified.
> else (assume pthreads) {
>   if (-pthread works)
>     specify -pthread in LD_FLAGS
>   else (if libpthread is available)
>     specify -lpthread in LIBS

   else if (pthread_kill is available)
       use pthreads without special LDFLAGS

>   else (no pthreads)
>     force the prefork MPM
> }

-- 

          Regards,

                            Sascha Schumann
                                 Consultant

Mime
View raw message