Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Mar 2001 12:52:00 +0200
From:      Panagiotis Astithas <past@netmode.ntua.gr>
To:        Doug Barton <DougB@FreeBSD.ORG>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Needs some autoconf + pthread + etc. clue
Message-ID:  <20010315125200.A30393@netmode.ece.ntua.gr>
In-Reply-To: <3AB071A4.8C6D9511@FreeBSD.org>; from DougB@FreeBSD.ORG on Wed, Mar 14, 2001 at 11:39:16PM -0800
References:  <3AB071A4.8C6D9511@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Mar 14, 2001 at 11:39:16PM -0800, Doug Barton wrote:
> The other hack I'm trying to get rid of is in the Makefile:
> 
> post-patch:
>         @ ${CP} ${WRKSRC}/configure ${WRKSRC}/configure.Patched
>         @ ${SED} -e 's#-lpthread#-pthread#g' \
>                 ${WRKSRC}/configure.Patched > ${WRKSRC}/configure

I haven't looked at xscreensaver's configure.in file, but you could
find the location of the pthread library with something like this:

PTHREAD_LIBS=error
dnl The Linux case:
AC_CHECK_LIB(pthread, pthread_attr_init, [
                      PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT"
                      PTHREAD_LIBS="-lpthread" ])

dnl The FreeBSD case:
if test "x$PTHREAD_LIBS" = xerror; then
   AC_CHECK_LIB(c_r, pthread_attr_init, [
                    PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_THREAD_SAFE"
                    PTHREAD_LIBS="-pthread" ])
fi

if test "x$PTHREAD_LIBS" = xerror; then
   AC_CHECK_FUNC(pthread_attr_init, PTHREAD_LIBS="",
      AC_MSG_ERROR(not found library: pthread !!!))
fi

Then of course you'd have to regenerate configure with autoconf.
HTH.

-past

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010315125200.A30393>