if  spell_ok  db
then
    if  spell_ok  gdbm
    then
        config_query_option  CIMAP_DB                                                                                                                                                                                             \
                             "You have both GDBM and Berkeley DB libraries installed.  Do you want to use GDBM with Courier?  (Courier will automatically choose GDBM over Berkely DB.  Answer 'n' to use Berkely DB instead.) "  \
                             y                                                                                                                                                                                                    \
                             "--with-db=gdbm"                                                                                                                                                                                     \
                             "--with-db=db"
    fi
else
    if  !  spell_ok  gdbm
    then
        config_query_option  CIMAP_DB                                                                                                                             \
                             "Either GDBM or Berkeley DB library must be installed.  Do you want to install GDBM?  (Answer 'n' to install Berkely DB instead.) "  \
                             y                                                                                                                                    \
                             "--with-db=gdbm"                                                                                                                     \
                             "--with-db=db"
    fi
fi  &&

config_query_option  CIMAP_IPV6              \
                     "Enable IPV6 support?"  \
                     y                       \
                     "--with-ipv6"           \
                     "--without-ipv6"        &&

config_query_option  CIMAP_UNICODE                                                                                                    \
                     "Include the ability to search and sort messages in character sets other than the default ISO-8859-1/US-ASCII?"  \
                     n                                                                                                                \
                     "--enable-unicode"                                                                                               \
                     "--disable-unicode"                                                                                              &&

config_query_option  CIMAP_IMAPBUGS                                                                                   \
                     "Enable workaround for broken IMAP clients (currently Netscape Messenger and Sun's StarOffice)?"  \
                     n                                                                                                 \
                     "--enable-workarounds-for-imap-client-bugs"                                                       \
                     "--disable-workarounds-for-imap-client-bugs"                                                      &&

config_query_option  CIMAP_TRASHQUOTA                                                                              \
                     "Include deleted messages, and the Trash folder, in the estimated quota usage for maildirs?"  \
                     n                                                                                             \
                     "--with-trashquota"                                                                           \
                     "--without-trashquota"                                                                        &&

config_query_option  CIMAP_DIRSYNC                                      \
                     "Explicitly sync the maildir's parent directory?"  \
                     n                                                  \
                     "--with-dirsync"                                   \
                     "--without-dirsync"                                &&

config_query_option  CIMAP_SMAP                                                                                              \
                     "Enable support for SMAP, an experimental mail access protocol, dubbed 'Simple Mail Access Protocol'?"  \
                     n                                                                                                       \
                     "--with-smap"                                                                                           \
                     "--without-smap"

