summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam>2003-05-25 19:02:32 +0000
committerjlam <jlam>2003-05-25 19:02:32 +0000
commita7edb05527966a0b11a41e069465f0008fec10d8 (patch)
tree6e8ca2e44fc44dfe4e9f80ad87b55b23578d3c67 /mk
parent6275106cd204b848fb69cd622b7644b1257efb41 (diff)
downloadpkgsrc-a7edb05527966a0b11a41e069465f0008fec10d8.tar.gz
Define user-visible variable "PTHREAD_CFLAGS" that contains compiler
options to compile/link pthreaded code.
Diffstat (limited to 'mk')
-rw-r--r--mk/pthread.buildlink2.mk10
1 files changed, 9 insertions, 1 deletions
diff --git a/mk/pthread.buildlink2.mk b/mk/pthread.buildlink2.mk
index 9a5447ded13..b41dfd034c5 100644
--- a/mk/pthread.buildlink2.mk
+++ b/mk/pthread.buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: pthread.buildlink2.mk,v 1.9 2003/05/02 15:11:46 wiz Exp $
+# $NetBSD: pthread.buildlink2.mk,v 1.10 2003/05/25 19:02:32 jlam Exp $
#
# The pthreads strategy for pkgsrc is to "bless" a particular pthread
# package as the Official Pthread Replacement (OPR). A package that uses
@@ -152,6 +152,8 @@ BUILDLINK_FILES.pthread+= lib/libpthread.*
BUILDLINK_TARGETS+= pthread-buildlink
BUILDLINK_TARGETS+= pthread-buildlink-la
+BUILDLINK_CFLAGS.pthread= -pthread
+
LIBTOOL_ARCHIVE_UNTRANSFORM_SED+= \
-e "s|${BUILDLINK_PREFIX.pthread}/lib/libpthread.la|-lpthread|g" \
-e "s|${LOCALBASE}/lib/libpthread.la|-lpthread|g"
@@ -170,12 +172,18 @@ pthread-buildlink-la:
BUILDLINK_DEPENDS.${_PKG_PTHREAD}= ${_PKG_PTHREAD_DEPENDS}
. endif
BUILDLINK_PREFIX.pthread= ${BUILDLINK_PREFIX.${_PKG_PTHREAD}}
+BUILDLINK_CFLAGS.pthread= ${BUILDLINK_CFLAGS.${_PKG_PTHREAD}}
. include "${_PKG_PTHREAD_BUILDLINK2_MK}"
. else
PKG_FAIL_REASON= "${PKGNAME} needs pthreads, but ${_PKG_PTHREAD_BUILDLINK2_MK} is missing."
. endif
.endif
+# Define user-visible PTHREAD_CFLAGS as compiler options used to
+# compile/link pthreaded code.
+#
+PTHREAD_CFLAGS= ${BUILDLINK_CFLAGS.pthread}
+
PTHREADBASE= ${BUILDLINK_PREFIX.pthread}
CONFIGURE_ENV+= PTHREADBASE=${PTHREADBASE}
MAKE_ENV+= PTHREADBASE=${PTHREADBASE}