diff options
author | xtraeme <xtraeme@pkgsrc.org> | 2004-06-21 00:06:37 +0000 |
---|---|---|
committer | xtraeme <xtraeme@pkgsrc.org> | 2004-06-21 00:06:37 +0000 |
commit | 9ae1f907ad31b4013043db4324e34fa5970560a0 (patch) | |
tree | abe6e72d3e437c3667bda4c6a5da5fee8ba6fb44 /mk | |
parent | a9676e694c4bfe38cc4256f3b677ded4ad968eb5 (diff) | |
download | pkgsrc-9ae1f907ad31b4013043db4324e34fa5970560a0.tar.gz |
Under OpenBSD there is no libpthread.so, just libpthread.so.X.X, and
BUILDLINK_LDADD.pthread was empty, so add a check to find the libraries
and if they are found, add -lpthread to BUILDLINK_LDADD.pthread, thanks
to grant beattie for the suggestion.
Reported and tested by Sergio Jimenez <tripledes at eslack dot org>.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/pthread.buildlink3.mk | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/mk/pthread.buildlink3.mk b/mk/pthread.buildlink3.mk index ba2b2fd0ca4..d022be64bce 100644 --- a/mk/pthread.buildlink3.mk +++ b/mk/pthread.buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: pthread.buildlink3.mk,v 1.6 2004/06/12 03:19:52 grant Exp $ +# $NetBSD: pthread.buildlink3.mk,v 1.7 2004/06/21 00:06:37 xtraeme Exp $ # # The pthreads strategy for pkgsrc is to "bless" a particular pthread # package as the Official Pthread Replacement (OPR). A package that uses @@ -163,6 +163,17 @@ BUILDLINK_CFLAGS.pthread= # empty BUILDLINK_LDADD.pthread= -lpthread . elif exists(/usr/lib/libc_r.so) BUILDLINK_LDADD.pthread= -lc_r +# In OpenBSD there is no libpthread.so, just libpthread.so.X.X. +. elif ${OPSYS} == "OpenBSD" +_CHECK_LIBPTH!= \ + if [ "`echo /usr/lib/libpthread.so.*`" = "/usr/lib/libpthread.so.*" ]; then \ + echo "yes"; \ + else \ + echo "no"; \ + fi +. if ${_CHECK_LIBPTH} == "yes" +BUILDLINK_LDADD.pthread= -lpthread +. endif . else BUILDLINK_LDADD.pthread= # empty . endif |