Subject: Re: threads pkgs [was: Re: CVS commit: pkgsrc]
To: None <rh@netbsd.org>
From: Frederick Bruckman <fb@enteract.com>
List: tech-pkg
Date: 12/30/1999 03:25:16
On Thu, 30 Dec 1999, Rene Hexel wrote:
> Frederick Bruckman wrote:
>
> > The cleanest way would probably be to add a CONFIGURE_ARG to the
> > package Makefile. I'll look at now.
>
> Hmm, to me, it looks like pthread checking is done unconditionally,
Yes, there's no with-- or enable-- arg to disable it...
> but if you find a CONFIGURE_ARG, that would be 'nicer' than having a
> patch. Just in case, I have attached my patch-aa that's removing this
> check ...
I'd rather avoid removing the check, because we may yet want to use
some pthreads as an option (maybe our own, someday). So far, I can
make it build with mit-pthreads, but it won't link: lwp is looking for
functions that mit-pthreads doesn't provide. I have also a general
distaste for patching configure directly (without a corresponding
patch to configure.in) because it's then difficult to submit.
So how do you like the following? My latest thinking is that this
method is a little neater than running configure, running sed over
config.cache, and then re-running configure.
*** /dev/null Thu Dec 30 03:06:45 1999
--- files/config.cache Thu Dec 30 02:47:10 1999
***************
*** 0 ****
--- 1 ----
+ ac_cv_lib_pthread_pthread_create=${ac_cv_lib_pthread_pthread_create='no'}
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/devel/lwp/Makefile,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 Makefile
*** Makefile 1999/12/29 09:45:10 1.1.1.1
--- Makefile 1999/12/30 09:14:41
***************
*** 14,17 ****
--- 14,31 ----
LTCONFIG_OVERRIDE= ${WRKSRC}/ltconfig
+ .include "../../mk/bsd.prefs.mk"
+
+ # XXX Not yet
+ #.if defined(LWP_USE_PTH)
+ #.if ${LWP_USE_PTH} == YES || ${LWP_USE_PTH} == yes
+ #BUILD_DEPENDS+= pth:../../devel/pth
+ #BUILD_DEFS+= LIBS
+ #CONFIGURE_ENV+= LIBS="-lpth -lpthreads"
+ #.else
+ pre-configure:
+ ${CP} ${FILESDIR}/config.cache ${WRKSRC}/
+ #.endif
+ #.endif
+
.include "../../mk/bsd.pkg.mk"