config_query_option OPENLDAP_SLAPD 'Build SLAPD, the standalone LDAP daemon?' y \
  '--enable-slapd --enable-modules --enable-cleartext --enable-crypt --enable-rlookups' \
  '--disable-slapd' &&

config_query_option OPENLDAP_SLURPD 'Build SLURPD, the replication daemon?' y \
  '--enable-slurpd' '--disable-slurpd' &&

if echo $OPENLDAP_SLAPD | grep -q enable; then
  config_query_list SLAPD_LDBM 'Select LDBM backend (Berkeley DB recommended)' \
                    db none &&
  config_query_option SLAPD_DNSSRV 'Enable DNS "SRV" record backend?' y \
                      '--enable-dnssrv=mod' '--disable-dnssrv' &&
  config_query_option SLAPD_MONITOR 'Enable monitor backend?' y \
                      '--enable-monitor=mod' '--disable-monitor' &&
  config_query_option SLAPD_ACI 'Enable per-object access control' n \
                      '--enable-aci' '--disable-aci'
fi &&

config_query OPENLDAP_NTLM "Enable NTLM API support (needed for Evolution Exchange plugin)?" n &&

message "${MESSAGE_COLOR}If you care about security, check out http://timof.qipc.org/ldap/libldap.html .$DEFAULT_COLOR" &&
message "${MESSAGE_COLOR}The patch is not in the spell anymore because of version mismatch...$DEFAULT_COLOR."
