summaryrefslogtreecommitdiff
path: root/security/stunnel/options.mk
diff options
context:
space:
mode:
Diffstat (limited to 'security/stunnel/options.mk')
-rw-r--r--security/stunnel/options.mk18
1 files changed, 16 insertions, 2 deletions
diff --git a/security/stunnel/options.mk b/security/stunnel/options.mk
index 4a1993b0e85..6fcaf194329 100644
--- a/security/stunnel/options.mk
+++ b/security/stunnel/options.mk
@@ -1,7 +1,10 @@
-# $NetBSD: options.mk,v 1.2 2005/07/04 10:29:43 salo Exp $
+# $NetBSD: options.mk,v 1.3 2007/08/11 14:41:36 schmonz Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.stunnel
-PKG_SUPPORTED_OPTIONS= inet6
+PKG_SUPPORTED_OPTIONS= inet6 pthread
+.if defined(PTHREAD_TYPE) && ${PTHREAD_TYPE} != "none"
+PKG_SUGGESTED_OPTIONS+= pthread
+.endif
.include "../../mk/bsd.options.mk"
@@ -13,3 +16,14 @@ CONFIGURE_ARGS+= --enable-ipv6
.else
CONFIGURE_ARGS+= --disable-ipv6
.endif
+
+###
+### Support pthreads
+###
+.if !empty(PKG_OPTIONS:Mpthread)
+CONFIGURE_ARGS+= --with-threads=pthread
+CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS} ${PTHREAD_CFLAGS}" \
+ LDFLAGS="${LDFLAGS} ${PTHREAD_LIBS}"
+.else
+CONFIGURE_ARGS+= --with-threads=fork
+.endif