blob: 0d418dc5d81221251670edff81587de910424796 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
# $NetBSD: options.mk,v 1.13 2006/04/13 21:45:13 wiz Exp $
# Global and legacy options
PKG_OPTIONS_VAR= PKG_OPTIONS.postfix
PKG_SUPPORTED_OPTIONS= bdb ldap mysql mysql4 pcre pgsql sasl tls
.include "../../mk/bsd.options.mk"
###
### Support "hash" (Berkeley DB) map type.
###
.if empty(PKG_OPTIONS:Mbdb)
PKG_OPTIONS+= bdb # "hash" map type is mandatory
.endif
.if !empty(PKG_OPTIONS:Mbdb)
. include "../../mk/bdb.buildlink3.mk"
CCARGS+= -DHAS_DB
AUXLIBS+= ${BDB_LIBS}
.endif
###
### STARTTLS support
###
.if !empty(PKG_OPTIONS:Mtls)
. include "../../security/openssl/buildlink3.mk"
CCARGS+= -DUSE_TLS
AUXLIBS+= -L${BUILDLINK_PREFIX.openssl}/lib \
${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.openssl}/lib \
-lssl -lcrypto
.endif
###
### Support "pcre" map type for regular expressions.
###
.if !empty(PKG_OPTIONS:Mpcre)
. include "../../devel/pcre/buildlink3.mk"
CCARGS+= -DHAS_PCRE
AUXLIBS+= -L${BUILDLINK_PREFIX.pcre}/lib \
${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.pcre}/lib \
-lpcre
.else
CCARGS+= -DNO_PCRE
.endif
###
### Support LDAP directories for table lookups.
###
.if !empty(PKG_OPTIONS:Mldap)
. include "../../databases/openldap/buildlink3.mk"
CCARGS+= -DHAS_LDAP
AUXLIBS+= -L${BUILDLINK_PREFIX.openldap}/lib \
${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.openldap}/lib \
-lldap -llber
.endif
###
### Support using a MySQL database server for table lookups.
###
.if !empty(PKG_OPTIONS:Mmysql4)
. include "../../mk/mysql.buildlink3.mk"
CCARGS+= -DHAS_MYSQL
CCARGS+= `${BUILDLINK_PREFIX.mysql-client}/bin/mysql_config --include`
AUXLIBS+= `${BUILDLINK_PREFIX.mysql-client}/bin/mysql_config --libs`
.elif !empty(PKG_OPTIONS:Mmysql)
. include "../../mk/mysql.buildlink3.mk"
CCARGS+= -DHAS_MYSQL -I${BUILDLINK_PREFIX.mysql-client}/include/mysql
AUXLIBS+= -L${BUILDLINK_PREFIX.mysql-client}/lib/mysql \
${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.mysql-client}/lib/mysql \
-lmysqlclient -lz -lm
.endif
###
### Support using a PostgreSQL database server for table lookups.
###
.if !empty(PKG_OPTIONS:Mpgsql)
. include "../../mk/pgsql.buildlink3.mk"
. include "../../security/openssl/buildlink3.mk"
CCARGS+= -DHAS_PGSQL -I${PGSQL_PREFIX}/include/pgsql
AUXLIBS+= -L${PGSQL_PREFIX}/lib -lpq \
-L${BUILDLINK_PREFIX.openssl}/lib -lcrypt -lssl -lcrypto
.endif
###
### SASL support for SMTP authentication.
###
.if !empty(PKG_OPTIONS:Msasl)
. include "../../security/cyrus-sasl/buildlink3.mk"
BUILDLINK_INCDIRS.cyrus-sasl= include/sasl
SASLLIBDIR= ${PREFIX}/lib/sasl2
PWCHECK_METHOD= auxprop
CCARGS+= -DUSE_SASL_AUTH -DUSE_CYRUS_SASL
AUXLIBS+= -L${BUILDLINK_PREFIX.cyrus-sasl}/lib \
${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.cyrus-sasl}/lib \
-lsasl2
PLIST_SUBST+= SASL=
MESSAGE_SRC+= ${PKGDIR}/MESSAGE.sasl
MESSAGE_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
MESSAGE_SUBST+= SASLLIBDIR=${SASLLIBDIR}
.else
PLIST_SUBST+= SASL="@comment "
.endif
|