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 gdbm 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_CONTEXT \
  'Security: Add context support (see http://timof.qipc.org/ldap/libldap.html)?' n \
