summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorxtraeme <xtraeme>2004-06-21 00:06:37 +0000
committerxtraeme <xtraeme>2004-06-21 00:06:37 +0000
commita15bb45d52cfd0ab2302a70eb629eea5bece3554 (patch)
treeabe6e72d3e437c3667bda4c6a5da5fee8ba6fb44 /mk
parent11b777d0a3f5d2c493ffd5f6a3a48c6d7c0bbe12 (diff)
downloadpkgsrc-a15bb45d52cfd0ab2302a70eb629eea5bece3554.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.mk13
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