Revert the patch that added locale support by buildlinking against
[pkgsrcv2.git] / chat / inspircd / options.mk
1 # $NetBSD: options.mk,v 1.1.1.1 2007/07/24 20:13:19 adrianp Exp $
2
3 PKG_OPTIONS_VAR=        PKG_OPTIONS.inspircd
4
5 PKG_SUPPORTED_OPTIONS=  inet6 ssl gnutls kqueue epoll inspircd-remoteinet6
6 PKG_SUPPORTED_OPTIONS+= pcre inspircd-ziplinks inspircd-sqlauth
7 PKG_SUPPORTED_OPTIONS+= inspircd-sqllog inspircd-sqloper
8 PKG_SUGGESTED_OPTIONS=  inet6
9
10 .include "../../mk/bsd.options.mk"
11
12 ###
13 ### Dependency notes:
14 ###
15 ### sql         = mysql, pgsql, sqlite3
16 ### sqlutils    = m_sqlutils.cpp m_sqlutils.h
17 ###
18 ### sqloper     needs sql sqlutils
19 ### sqllog      needs sql
20 ### sqlauth     needs sql sqlutils
21 ###
22
23 ###
24 ### Enable kqueue support
25 ###
26 .if !empty(PKG_OPTIONS:Mkqueue)
27 CONFIGURE_ARGS+=        --enable-kqueue
28 .else
29 CONFIGURE_ARGS+=        --disable-kqueue
30 .endif
31
32 ###
33 ### Enable epoll support
34 ###
35 .if !empty(PKG_OPTIONS:Mepoll)
36 CONFIGURE_ARGS+=        --enable-epoll
37 .else
38 CONFIGURE_ARGS+=        --disable-epoll
39 .endif
40
41 ###
42 ### Enable IPv6 support
43 ###
44 .if !empty(PKG_OPTIONS:Minet6)
45 CONFIGURE_ARGS+=        --enable-ipv6
46 .endif
47
48 ###
49 ### Enable remote IPv6 support
50 ###
51 .if !empty(PKG_OPTIONS:Mremoteinet6)
52 PKG_SUGGESTED_OPTIONS+= inet6
53 CONFIGURE_ARGS+=        --enable-remote-ipv6
54 .else
55 CONFIGURE_ARGS+=        --disable-remote-ipv6
56 .endif
57
58 ###
59 ### Enable OpenSSL support
60 ###
61 .if !empty(PKG_OPTIONS:Mssl)
62 .       include "../../security/openssl/buildlink3.mk"
63 BUILDLINK_API_DEPENDS.openssl+= openssl>=0.9.7
64 CONFIGURE_ARGS+=        --enable-openssl
65 MODULES+=               m_ssl_openssl.cpp
66 .endif
67
68 ###
69 ### Enable GNU TLS support
70 ### Apparently this gives better performance when compared to OpenSSL
71 ###
72 .if !empty(PKG_OPTIONS:Mgnutls)
73 .       include "../../security/gnutls/buildlink3.mk"
74 CONFIGURE_ARGS+=        --enable-gnutls
75 MODULES+=               m_ssl_gnutls.cpp
76 .endif
77
78 ###
79 ### Compile in support for ziplinks.  This compresses data sent from
80 ### server <-> server with zlib.
81 ###
82 .if !empty(PKG_OPTIONS:Minspircd-ziplinks)
83 .       include "../../devel/zlib/buildlink3.mk"
84 MODULES+=               m_ziplink.cpp
85 .endif
86
87 ###
88 ### Perl regex support
89 ###
90 .if !empty(PKG_OPTIONS:Mpcre)
91 .       include "../../devel/pcre/buildlink3.mk"
92 MODULES+=               m_filter_pcre.cpp
93 .endif
94
95 ###
96 ### Use SQL for storing user details
97 ###
98 .if !empty(PKG_OPTIONS:Minspircd-sqlauth)
99 INSPIRCD_STORAGE_DRIVER?=       mysql
100 MODULES+=               m_sqlauth.cpp m_sqlutils.cpp
101 HEADERS+=               m_sqlutils.h
102 .endif
103
104 ###
105 ### Use SQL for logging
106 ###
107 .if !empty(PKG_OPTIONS:Minspircd-sqllog)
108 INSPIRCD_STORAGE_DRIVER?=       mysql
109 MODULES+=               m_sqllog.cpp
110 .endif
111
112 ###
113 ### Use SQL for storing oper details
114 ###
115 .if !empty(PKG_OPTIONS:Minspircd-sqloper)
116 INSPIRCD_STORAGE_DRIVER?=       mysql
117 MODULES+=               m_sqloper.cpp m_sqlutils.cpp
118 HEADERS+=               m_sqlutils.h
119 .endif
120
121 ###
122 ### Strorage driver magic
123 ###
124 ### This will only be activated if INSPIRCD_STORAGE_DRIVER is set either
125 ### explictly by the user or by selecting one of the options that are
126 ### dependent on an SQL storage driver.
127 ###
128 .if defined(INSPIRCD_STORAGE_DRIVER)
129 BUILD_DEFS+=            INSPIRCD_STORAGE_DRIVER
130 .  if !empty(INSPIRCD_STORAGE_DRIVER:Mmysql)
131 .       include "../../mk/mysql.buildlink3.mk"
132 MODULES+=               m_mysql.cpp
133 HEADERS+=               m_sqlv2.h
134 .  elif !empty(INSPIRCD_STORAGE_DRIVER:Mpgsql)
135 .       include "../../mk/pgsql.buildlink3.mk"
136 MODULES+=               m_pgsql.cpp
137 HEADERS+=               m_sqlv2.h
138 .  elif !empty(INSPIRCD_STORAGE_DRIVER:Msqlite3)
139 .       include "../../databases/sqlite3/buildlink3.mk"
140 MODULES+=               m_sqlite3.cpp
141 HEADERS+=               m_sqlv2.h
142 .  else
143 PKG_FAIL_REASON+=       "${PKGBASE}: unknown storage driver \\'${INSPIRCD_STORAGE_DRIVER}\\'"
144 .  endif
145 .endif