From owner-freebsd-hackers Thu Mar 15 2:42:31 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from ntua.gr (achilles.noc.ntua.gr [147.102.222.210]) by hub.freebsd.org (Postfix) with ESMTP id 23ED237B718; Thu, 15 Mar 2001 02:42:27 -0800 (PST) (envelope-from past@netmode.ntua.gr) Received: from netmode.ntua.gr (dolly.netmode.ece.ntua.gr [147.102.13.10]) by ntua.gr (8.9.3/8.9.3) with ESMTP id MAA21782; Thu, 15 Mar 2001 12:42:20 +0200 (EET) Received: (from past@localhost) by netmode.ntua.gr (8.11.1/8.11.1) id f2FAq0t31042; Thu, 15 Mar 2001 12:52:00 +0200 (EET) (envelope-from past) Date: Thu, 15 Mar 2001 12:52:00 +0200 From: Panagiotis Astithas To: Doug Barton Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Needs some autoconf + pthread + etc. clue Message-ID: <20010315125200.A30393@netmode.ece.ntua.gr> Reply-To: past@netmode.ntua.gr Mail-Followup-To: Panagiotis Astithas , Doug Barton , freebsd-hackers@FreeBSD.ORG References: <3AB071A4.8C6D9511@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <3AB071A4.8C6D9511@FreeBSD.org>; from DougB@FreeBSD.ORG on Wed, Mar 14, 2001 at 11:39:16PM -0800 X-Organizational-Unit: Network Management and Optimal Design Laboratory X-Organization: National Technical University of Athens, GREECE X-Work-Phone: +30-1-772-1-450 X-Work-FAX: +30-1-772-1-452 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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