source $GRIMOIRE/config_query_multi.function &&

config_query_option MADB_OPTS "Install client only?" n \
                              "--without-server" \
                              "--with-server" &&

config_query_option MADB_OPTS "Build the embedded server (libmysqld)?" n \
                              "--with-embedded-server" \
                              "--without-embedded-server" &&

if list_find "$MADB_OPTS" "--with-server"; then
  config_query_option MADB_OPTS "Use libevent and have connection pooling?" n \
                                "--with-libevent=yes" \
                                "--with-libevent=no"
fi &&

config_query_list    MADB_CHARSET "Select default character set"  \
                     latin1                                       \
                     utf8                                         \
                     binary                                       \
                     armscii8                                     \
                     ascii                                        \
                     big5                                         \
                     cp1250                                       \
                     cp1251                                       \
                     cp1256                                       \
                     cp1257                                       \
                     cp850                                        \
                     cp852                                        \
                     cp866                                        \
                     cp932                                        \
                     dec8                                         \
                     eucjpms                                      \
                     euckr                                        \
                     gb2312                                       \
                     gbk                                          \
                     geostd8                                      \
                     greek                                        \
                     hebrew                                       \
                     hp8                                          \
                     keybcs2                                      \
                     koi8r                                        \
                     koi8u                                        \
                     latin2                                       \
                     latin5                                       \
                     latin7                                       \
                     macce                                        \
                     macroman                                     \
                     sjis                                         \
                     swe7                                         \
                     tis620                                       \
                     ucs2                                         \
                     ujis                                         &&

config_query_multi   MADB_ENGINES                                 \
                     "What additional storage engines to build?"  \
                     none                                         \
                     all                                          \
                     archive                                      \
                     xtradb                                       \
                     blackhole                                    \
                     example                                      \
                     federated                                    \
                     innodb_plugin                                \
                     ndbcluster                                   \
                     myisam                                       \
                     partition                                    \
                     auth                                         \
                     daemon_example                               \
                     ftexample                                    \
                     csv                                          \
                     federatedx                                   \
                     heap                                         \
                     ibmdb2i                                      \
                     aria                                         \
                     myisammrg                                    \
                     oqgraph                                      \
                     pbxt                                         \
                     sphinx                                       &&

if list_find "$MADB_ENGINES" "all"; then
  MADB_ENGINES="all"
elif list_find "$MADB_ENGINES" "none"; then
  MADB_ENGINES="none"
fi
