summaryrefslogtreecommitdiff
path: root/mail/dovecot/options.mk
blob: 6f22de2fbb03f7c9328dd9fcec782353891c4829 (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
# $NetBSD: options.mk,v 1.3 2004/08/05 02:22:19 jlam Exp $

# Global and legacy options
.if defined(DOVECOT_USE_GNUTLS) || defined(DOVECOT_USE_MYSQL) || \
    defined(DOVECOT_USE_PGSQL) || defined(USE_INET6) || \
    defined(USE_OPENLDAP) || defined(USE_SASL2)
.  if !defined(PKG_OPTIONS.dovecot)
.    if defined(DOVECOT_USE_GNUTLS) && !empty(DOVECOT_USE_GNUTLS:M[Yy][Ee][Ss])
PKG_OPTIONS.dovecot+=	gnutls
.    endif
.    if defined(DOVECOT_USE_MYSQL) && !empty(DOVECOT_USE_MYSQL:M[Yy][Ee][Ss])
PKG_OPTIONS.dovecot+=	mysql
.    endif
.    if defined(DOVECOT_USE_PGSQL) && !empty(DOVECOT_USE_PGSQL:M[Yy][Ee][Ss])
PKG_OPTIONS.dovecot+=	pgsql
.    endif
.    if defined(USE_INET6) && !empty(USE_INET6:M[Yy][Ee][Ss])
PKG_OPTIONS.dovecot+=	inet6
.    endif
.    if defined(USE_OPENLDAP) && !empty(USE_OPENLDAP:M[Yy][Ee][Ss])
PKG_OPTIONS.dovecot+=	ldap
.    endif
.    if defined(USE_SASL2) && !empty(USE_SASL2:M[Yy][Ee][Ss])
PKG_OPTIONS.dovecot+=	sasl
.    endif
.  endif
.endif

PKG_OPTIONS_VAR=	PKG_OPTIONS.dovecot
PKG_SUPPORTED_OPTIONS=	gnutls inet6 ldap mysql pgsql sasl
.include "../../mk/bsd.options.mk"

###
### Build with GNU TLS or OpenSSL as the underlying crypto library.
###
.if !empty(PKG_OPTIONS:Mgnutls)
CONFIGURE_ARGS+=	--enable-ssl=gnutls
.  include "../../security/gnutls/buildlink3.mk"
.else
CONFIGURE_ARGS+=        --enable-ssl=openssl
.  include "../../security/openssl/buildlink3.mk"
.endif

###
### MySQL support.
###
.if !empty(PKG_OPTIONS:Mmysql)
CONFIGURE_ARGS+=	--with-mysql
.  include "../../databases/mysql4-client/buildlink3.mk"
.endif

###
### PostgreSQL support.
###
.if !empty(PKG_OPTIONS:Mpgsql)
CONFIGURE_ARGS+=	--with-pgsql
CPPFLAGS+=		-I${BUILDLINK_DIR}/include/pgsql
.  include "../../mk/pgsql.buildlink3.mk"
.endif

###
### IPv6 support.
###
.if !empty(PKG_OPTIONS:Minet6)
CONFIGURE_ARGS+=	--enable-ipv6
.endif

###
### LDAP directory support.
###
.if !empty(PKG_OPTIONS:Mldap)
CONFIGURE_ARGS+=	--with-ldap
.  include "../../databases/openldap/buildlink3.mk"
.endif

###
### IMAP-AUTH via SASL.
###
.if !empty(PKG_OPTIONS:Msasl)
CONFIGURE_ARGS+=	--with-cyrus-sasl2
.  include "../../security/cyrus-sasl2/buildlink3.mk"
.endif