summaryrefslogtreecommitdiff
path: root/chat/inspircd12/options.mk
blob: 512824ff211512dd92b53145b9819944efbb1564 (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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# $NetBSD: options.mk,v 1.2 2009/07/03 14:50:34 drochner Exp $

PKG_OPTIONS_VAR=	PKG_OPTIONS.inspircd

PKG_SUPPORTED_OPTIONS=	inet6 ssl gnutls kqueue epoll inspircd-remoteinet6
PKG_SUPPORTED_OPTIONS+=	pcre inspircd-ziplinks inspircd-sqlauth
PKG_SUPPORTED_OPTIONS+=	inspircd-sqllog inspircd-sqloper
PKG_SUGGESTED_OPTIONS=	inet6

.include "../../mk/bsd.options.mk"

###
### Dependency notes:
###
### sql 	= mysql, pgsql, sqlite3
### sqlutils 	= m_sqlutils.cpp m_sqlutils.h
###
### sqloper 	needs sql sqlutils
### sqllog	needs sql
### sqlauth	needs sql sqlutils
###

###
### Enable kqueue support
###
.if !empty(PKG_OPTIONS:Mkqueue)
CONFIGURE_ARGS+=	--enable-kqueue
.else
CONFIGURE_ARGS+=	--disable-kqueue
.endif

###
### Enable epoll support
###
.if !empty(PKG_OPTIONS:Mepoll)
CONFIGURE_ARGS+=	--enable-epoll
.else
CONFIGURE_ARGS+=	--disable-epoll
.endif

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

###
### Enable remote IPv6 support
###
.if !empty(PKG_OPTIONS:Mremoteinet6)
PKG_SUGGESTED_OPTIONS+=	inet6
CONFIGURE_ARGS+=	--enable-remote-ipv6
.else
CONFIGURE_ARGS+=	--disable-remote-ipv6
.endif

###
### Enable OpenSSL support
###
.if !empty(PKG_OPTIONS:Mssl)
.	include "../../security/openssl/buildlink3.mk"
BUILDLINK_API_DEPENDS.openssl+=	openssl>=0.9.7
CONFIGURE_ARGS+=	--enable-openssl
MODULES+=		m_ssl_openssl.cpp
.endif

###
### Enable GNU TLS support
### Apparently this gives better performance when compared to OpenSSL
###
.if !empty(PKG_OPTIONS:Mgnutls)
.	include "../../security/gnutls/buildlink3.mk"
.       include "../../security/gnutls/libgnutls-config.mk"
CONFIGURE_ARGS+=	--enable-gnutls
MODULES+=		m_ssl_gnutls.cpp
.endif

###
### Compile in support for ziplinks.  This compresses data sent from
### server <-> server with zlib.
###
.if !empty(PKG_OPTIONS:Minspircd-ziplinks)
.	include "../../devel/zlib/buildlink3.mk"
MODULES+=		m_ziplink.cpp
.endif

###
### Perl regex support
###
.if !empty(PKG_OPTIONS:Mpcre)
.	include "../../devel/pcre/buildlink3.mk"
MODULES+=		m_filter_pcre.cpp
.endif

###
### Use SQL for storing user details
###
.if !empty(PKG_OPTIONS:Minspircd-sqlauth)
INSPIRCD_STORAGE_DRIVER?=	mysql
MODULES+=		m_sqlauth.cpp m_sqlutils.cpp
HEADERS+=		m_sqlutils.h
.endif

###
### Use SQL for logging
###
.if !empty(PKG_OPTIONS:Minspircd-sqllog)
INSPIRCD_STORAGE_DRIVER?=	mysql
MODULES+=		m_sqllog.cpp
.endif

###
### Use SQL for storing oper details
###
.if !empty(PKG_OPTIONS:Minspircd-sqloper)
INSPIRCD_STORAGE_DRIVER?=	mysql
MODULES+=		m_sqloper.cpp m_sqlutils.cpp
HEADERS+=		m_sqlutils.h
.endif

###
### Strorage driver magic
###
### This will only be activated if INSPIRCD_STORAGE_DRIVER is set either
### explictly by the user or by selecting one of the options that are
### dependent on an SQL storage driver.
###
.if defined(INSPIRCD_STORAGE_DRIVER)
BUILD_DEFS+=		INSPIRCD_STORAGE_DRIVER
.  if !empty(INSPIRCD_STORAGE_DRIVER:Mmysql)
.	include "../../mk/mysql.buildlink3.mk"
MODULES+=		m_mysql.cpp
HEADERS+=		m_sqlv2.h
.  elif !empty(INSPIRCD_STORAGE_DRIVER:Mpgsql)
.	include "../../mk/pgsql.buildlink3.mk"
MODULES+=		m_pgsql.cpp
HEADERS+=		m_sqlv2.h
.  elif !empty(INSPIRCD_STORAGE_DRIVER:Msqlite3)
.	include "../../databases/sqlite3/buildlink3.mk"
MODULES+=		m_sqlite3.cpp
HEADERS+=		m_sqlv2.h
.  else
PKG_FAIL_REASON+=	"${PKGBASE}: unknown storage driver \\'${INSPIRCD_STORAGE_DRIVER}\\'"
.  endif
.endif