summaryrefslogtreecommitdiff
path: root/databases/openldap/Makefile.options
diff options
context:
space:
mode:
Diffstat (limited to 'databases/openldap/Makefile.options')
-rw-r--r--databases/openldap/Makefile.options55
1 files changed, 24 insertions, 31 deletions
diff --git a/databases/openldap/Makefile.options b/databases/openldap/Makefile.options
index 5f5c22e01b4..e5f1d5d21a9 100644
--- a/databases/openldap/Makefile.options
+++ b/databases/openldap/Makefile.options
@@ -1,45 +1,29 @@
-# $NetBSD: Makefile.options,v 1.4 2004/07/24 18:37:10 jlam Exp $
-#
-# OPENLDAP_ALL_OPTIONS lists all of the currently-supported optional modules
-# that *may* be built.
-#
-# OPENLDAP_OPTIONS is a list of the modules that *will* be built.
-#
-OPENLDAP_ALL_OPTIONS= dynamic sasl slp
+# $NetBSD: Makefile.options,v 1.5 2004/07/30 21:05:41 jlam Exp $
-.if defined(USE_SASL) || defined(USE_SASL2) || defined(KERBEROS)
-. if !defined(OPENLDAP_OPTIONS)
-. if defined(USE_SASL2) && !empty(USE_SASL2:M[yY][eE][sS])
-OPENLDAP_OPTIONS+= sasl
+# Global and legacy options
+.if defined(KERBEROS) || defined(USE_SASL) || defined(USE_SASL2)
+. if !defined(PKG_OPTIONS.openldap)
+. if defined(KERBEROS)
+PKG_OPTIONS.openldap+= kerberos
. endif
. if defined(USE_SASL) && !empty(USE_SASL:M[yY][eE][sS])
-OPENLDAP_OPTIONS+= sasl
+PKG_OPTIONS.openldap+= sasl
. endif
-. if defined(KERBEROS)
-OPENLDAP_OPTIONS+= sasl
+. if defined(USE_SASL2) && !empty(USE_SASL2:M[yY][eE][sS])
+PKG_OPTIONS.openldap+= sasl
. endif
. endif
.endif
-OPENLDAP_OPTIONS?= # empty
-BUILD_DEFS+= OPENLDAP_OPTIONS
-
-_OPENLDAP_OPTIONS= # empty
-.for _opt_ in ${OPENLDAP_OPTIONS}
-. if empty(_OPENLDAP_OPTIONS:M${_opt_})
-. if !empty(OPENLDAP_ALL_OPTIONS:M${_opt_})
-_OPENLDAP_OPTIONS+= ${_opt_}
-. else
-PKG_FAIL_REASON+= "\"${_opt_}\" is not a supported Mutt build option."
-. endif
-. endif
-.endfor
+PKG_OPTIONS_VAR= PKG_OPTIONS.openldap
+PKG_SUPPORTED_OPTIONS= dynamic kerberos sasl slp
+.include "../../mk/bsd.options.mk"
###
### Whether to build with dynamically-loadable backend modules. If not
### specified, then link the backend modules statically into slapd.
###
-.if !empty(_OPENLDAP_OPTIONS:Mdynamic)
+.if !empty(PKG_OPTIONS:Mdynamic)
CONFIGURE_ARGS+= --enable-modules
PLIST_SUBST+= DYNAMIC_MOD=
.else
@@ -47,9 +31,18 @@ PLIST_SUBST+= DYNAMIC_MOD="@comment "
.endif
###
+### Kerberos authentication is via SASL.
+###
+.if !empty(PKG_OPTIONS:Mkerberos)
+. if empty(PKG_OPTIONS:Msasl)
+PKG_OPTIONS+= sasl
+. endif
+.endif
+
+###
### SASL authentication
###
-.if !empty(_OPENLDAP_OPTIONS:Msasl)
+.if !empty(PKG_OPTIONS:Msasl)
. if !defined(USE_SASL2) && !defined(USE_SASL)
. include "../../security/cyrus-sasl2/buildlink3.mk"
CONFIGURE_ARGS+= --with-cyrus-sasl
@@ -65,7 +58,7 @@ CONFIGURE_ARGS+= --with-cyrus-sasl
###
### SLP (Service Locator Protocol)
###
-.if !empty(_OPENLDAP_OPTIONS:Mslp)
+.if !empty(PKG_OPTIONS:Mslp)
. include "../../net/openslp/buildlink3.mk"
CONFIGURE_ARGS+= --enable-slp
.endif