1 # $NetBSD: options.mk,v 1.1.1.1 2007/07/24 20:13:19 adrianp Exp $
3 PKG_OPTIONS_VAR= PKG_OPTIONS.inspircd
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
10 .include "../../mk/bsd.options.mk"
15 ### sql = mysql, pgsql, sqlite3
16 ### sqlutils = m_sqlutils.cpp m_sqlutils.h
18 ### sqloper needs sql sqlutils
20 ### sqlauth needs sql sqlutils
24 ### Enable kqueue support
26 .if !empty(PKG_OPTIONS:Mkqueue)
27 CONFIGURE_ARGS+= --enable-kqueue
29 CONFIGURE_ARGS+= --disable-kqueue
33 ### Enable epoll support
35 .if !empty(PKG_OPTIONS:Mepoll)
36 CONFIGURE_ARGS+= --enable-epoll
38 CONFIGURE_ARGS+= --disable-epoll
42 ### Enable IPv6 support
44 .if !empty(PKG_OPTIONS:Minet6)
45 CONFIGURE_ARGS+= --enable-ipv6
49 ### Enable remote IPv6 support
51 .if !empty(PKG_OPTIONS:Mremoteinet6)
52 PKG_SUGGESTED_OPTIONS+= inet6
53 CONFIGURE_ARGS+= --enable-remote-ipv6
55 CONFIGURE_ARGS+= --disable-remote-ipv6
59 ### Enable OpenSSL support
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
69 ### Enable GNU TLS support
70 ### Apparently this gives better performance when compared to OpenSSL
72 .if !empty(PKG_OPTIONS:Mgnutls)
73 . include "../../security/gnutls/buildlink3.mk"
74 CONFIGURE_ARGS+= --enable-gnutls
75 MODULES+= m_ssl_gnutls.cpp
79 ### Compile in support for ziplinks. This compresses data sent from
80 ### server <-> server with zlib.
82 .if !empty(PKG_OPTIONS:Minspircd-ziplinks)
83 . include "../../devel/zlib/buildlink3.mk"
84 MODULES+= m_ziplink.cpp
88 ### Perl regex support
90 .if !empty(PKG_OPTIONS:Mpcre)
91 . include "../../devel/pcre/buildlink3.mk"
92 MODULES+= m_filter_pcre.cpp
96 ### Use SQL for storing user details
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
105 ### Use SQL for logging
107 .if !empty(PKG_OPTIONS:Minspircd-sqllog)
108 INSPIRCD_STORAGE_DRIVER?= mysql
109 MODULES+= m_sqllog.cpp
113 ### Use SQL for storing oper details
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
122 ### Strorage driver magic
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.
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
134 . elif !empty(INSPIRCD_STORAGE_DRIVER:Mpgsql)
135 . include "../../mk/pgsql.buildlink3.mk"
136 MODULES+= m_pgsql.cpp
138 . elif !empty(INSPIRCD_STORAGE_DRIVER:Msqlite3)
139 . include "../../databases/sqlite3/buildlink3.mk"
140 MODULES+= m_sqlite3.cpp
143 PKG_FAIL_REASON+= "${PKGBASE}: unknown storage driver \\'${INSPIRCD_STORAGE_DRIVER}\\'"