diff options
author | jlam <jlam@pkgsrc.org> | 2004-11-12 23:29:34 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-11-12 23:29:34 +0000 |
commit | 0786cc66d48d833120921a54b4f9f2bd5edb72b1 (patch) | |
tree | 19137eed4452b38dd9e1f4a0e052122fa3fbae29 /lang | |
parent | 1f0bab159b9abea1269266a43d4b8dd7971d33b2 (diff) | |
download | pkgsrc-0786cc66d48d833120921a54b4f9f2bd5edb72b1.tar.gz |
Default to building perl-thread on platforms with native pthreads.
Perl-5.8.x and up are supposed to properly support pthreads if they're
available. The GNU pth support isn't quite there yet, so we can't build
with thread support on all platforms.
Diffstat (limited to 'lang')
-rw-r--r-- | lang/perl58/Makefile | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lang/perl58/Makefile b/lang/perl58/Makefile index 7d41d73aeb2..ccaef53f0ad 100644 --- a/lang/perl58/Makefile +++ b/lang/perl58/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.56 2004/11/12 23:27:46 jlam Exp $ +# $NetBSD: Makefile,v 1.57 2004/11/12 23:29:34 jlam Exp $ # The following two variables should have empty values unless we're # building a perl snapshot or release candidate. @@ -149,10 +149,20 @@ PERL5_HINTS_LDDLFLAGS= # empty PERL5_HINTS_LDFLAGS+= ${LOCLIBRPATHFLAGS} +# On platforms that have native pthreads, default to installing the +# threaded perl. This can be overridden by explicitly setting +# PERL5_USE_THREADS. +# +.if exists(/usr/include/pthread.h) && \ + !empty(PREFER_NATIVE_PTHREADS:M[yY][eE][sS]) +PERL5_USE_THREADS?= yes +.else +PERL5_USE_THREADS?= no +.endif + # If perl58 is built with threads support, then name the package # "perl-thread", otherwise it's just "perl" as usual. # -PERL5_USE_THREADS?= no .if !empty(PERL5_USE_THREADS:M[nN][oO]) PERL5_PKGSUFFIX= # empty CONFLICTS+= perl-thread-[0-9]* |