1 # $NetBSD: options.mk,v 1.1.1.1 2009/01/04 00:52:27 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 . include "../../security/gnutls/libgnutls-config.mk"
75 CONFIGURE_ARGS+= --enable-gnutls
76 MODULES+= m_ssl_gnutls.cpp
80 ### Compile in support for ziplinks. This compresses data sent from
81 ### server <-> server with zlib.
83 .if !empty(PKG_OPTIONS:Minspircd-ziplinks)
84 . include "../../devel/zlib/buildlink3.mk"
85 MODULES+= m_ziplink.cpp
89 ### Perl regex support
91 .if !empty(PKG_OPTIONS:Mpcre)
92 . include "../../devel/pcre/buildlink3.mk"
93 MODULES+= m_filter_pcre.cpp
97 ### Use SQL for storing user details
99 .if !empty(PKG_OPTIONS:Minspircd-sqlauth)
100 INSPIRCD_STORAGE_DRIVER?= mysql
101 MODULES+= m_sqlauth.cpp m_sqlutils.cpp
102 HEADERS+= m_sqlutils.h
106 ### Use SQL for logging
108 .if !empty(PKG_OPTIONS:Minspircd-sqllog)
109 INSPIRCD_STORAGE_DRIVER?= mysql
110 MODULES+= m_sqllog.cpp
114 ### Use SQL for storing oper details
116 .if !empty(PKG_OPTIONS:Minspircd-sqloper)
117 INSPIRCD_STORAGE_DRIVER?= mysql
118 MODULES+= m_sqloper.cpp m_sqlutils.cpp
119 HEADERS+= m_sqlutils.h
123 ### Strorage driver magic
125 ### This will only be activated if INSPIRCD_STORAGE_DRIVER is set either
126 ### explictly by the user or by selecting one of the options that are
127 ### dependent on an SQL storage driver.
129 .if defined(INSPIRCD_STORAGE_DRIVER)
130 BUILD_DEFS+= INSPIRCD_STORAGE_DRIVER
131 . if !empty(INSPIRCD_STORAGE_DRIVER:Mmysql)
132 . include "../../mk/mysql.buildlink3.mk"
133 MODULES+= m_mysql.cpp
135 . elif !empty(INSPIRCD_STORAGE_DRIVER:Mpgsql)
136 . include "../../mk/pgsql.buildlink3.mk"
137 MODULES+= m_pgsql.cpp
139 . elif !empty(INSPIRCD_STORAGE_DRIVER:Msqlite3)
140 . include "../../databases/sqlite3/buildlink3.mk"
141 MODULES+= m_sqlite3.cpp
144 PKG_FAIL_REASON+= "${PKGBASE}: unknown storage driver \\'${INSPIRCD_STORAGE_DRIVER}\\'"