summaryrefslogtreecommitdiffstats
path: root/database/mariadb/CONFIGURE
blob: 1c4a39a367557f0f9ccdc1530477c359c31d5ce7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
source $GRIMOIRE/config_query_multi.function &&

# backporting legacy options
if [[ -n "$MADB_OPTS" ]]; then
  persistent_add MARIADB_OPTS &&
  MARIADB_OPTS="$MADB_OPTS" &&
  persistent_remove MADB_OPTS
fi &&

if [[ $MARIADB_BRANCH == 5.5 ]]; then
  if list_find "$MARIADB_OPTS" "--with-embedded-server"; then
    list_remove "MARIADB_OPTS" "--with-embedded-server" &&
    list_add "MARIADB_OPTS" "-DWITH_EMBEDDED_SERVER=ON"
  elif list_find "$MARIADB_OPTS" "--without-embedded-server"; then
    list_remove "MARIADB_OPTS" "--without-embedded-server" &&
    list_add "MARIADB_OPTS" "-DWITH_EMBEDDED_SERVER=OFF"
  elif list_find "$MARIADB_OPTS" "--with-server"; then
    list_remove "MARIADB_OPTS" "--with-server" &&
    list_add "MARIADB_OPTS" "-DWITHOUT_SERVER=OFF"
  elif list_find "$MARIADB_OPTS" "--without-server"; then
    list_remove "MARIADB_OPTS" "--without-server" &&
    list_add "MARIADB_OPTS" "-DWITHOUT_SERVER=ON"
  fi &&

  config_query_option MARIADB_OPTS "Build the embedded server (libmysqld)?" n \
                                   "-DWITH_EMBEDDED_SERVER=ON" \
                                   "-DWITH_EMBEDDED_SERVER=OFF" &&

  config_query_option MARIADB_OPTS "Install client only?" n \
                                   "-DWITHOUT_SERVER=ON" \
                                   "-DWITHOUT_SERVER=OFF"
else
  config_query_option MARIADB_OPTS "Install client only?" n \
                                   "--without-server" \
                                   "--with-server" &&

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

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

# backporting legacy options
if [[ -n "$MADB_CHARSET" ]]; then
  persistent_add MARIADB_CHARSET &&
  MARIADB_CHARSET="$MADB_CHARSET" &&
  persistent_remove MADB_CHARSET
fi &&

config_query_list MARIADB_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                            \
                                  utf16                           \
                                  utf32                           \
                                  utf8mb4                         &&

# backporting legacy options
if [[ -n "$MADB_ENGINES" ]]; then
  persistent_add MARIADB_ENGINES &&
  MARIADB_ENGINES="$MADB_ENGINES" &&
  persistent_remove MADB_ENGINES
fi &&

if [[ $MARIADB_BRANCH == 5.5 ]]; then
  local MARIADB_ENGINES_LIST="archive aria blackhole csv example federated federatedx heap innobase myisam myisammrg ndbcluster oqgraph partition perfschema sphinx tokudb xtradb"
else
  local MARIADB_ENGINES_LIST="archive aria blackhole csv example federated federatedx heap ibmdb2i innodb_plugin myisam ndbcluster oqgraph pbxt sphinx xtradb"
fi &&

config_query_multi MARIADB_ENGINES "What storage engines to build?" \
                                   none                             \
                                   all                              \
                                   $MARIADB_ENGINES_LIST            &&

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