1
dnl In order to add new charset, you must add charset name to
2
dnl this CHARSETS_AVAILABLE list and sql/share/charsets/Index.xml.
3
dnl If the character set uses strcoll or other special handling,
4
dnl you must also create strings/ctype-$charset_name.c
8
define(CHARSETS_AVAILABLE0,binary)
9
define(CHARSETS_AVAILABLE5,utf8)
12
CHARSETS_AVAILABLE="CHARSETS_AVAILABLE0 CHARSETS_AVAILABLE5"
13
CHARSETS_COMPLEX="utf8"
18
[ --with-charset=CHARSET
19
Default character set, use one of: CHARSETS_AVAILABLE0 CHARSETS_AVAILABLE5],
20
[default_charset="$withval"],
21
[default_charset="$DEFAULT_CHARSET"])
23
AC_ARG_WITH(collation,
24
[ --with-collation=COLLATION
26
[default_collation="$withval"],
27
[default_collation="default"])
29
AC_MSG_CHECKING("character sets")
31
CHARSETS="$default_charset utf8 utf8mb3"
39
AC_DEFINE(HAVE_CHARSET_utf8mb4, 1, [Define to enable ut8])
40
AC_DEFINE([USE_MB], 1, [Use multi-byte character routines])
41
AC_DEFINE(USE_MB_IDENT, [1], [ ])
44
AC_DEFINE(HAVE_CHARSET_utf8mb3, 1, [Define to enable ut8])
45
AC_DEFINE([USE_MB], 1, [Use multi-byte character routines])
46
AC_DEFINE(USE_MB_IDENT, 1)
49
AC_MSG_ERROR([Charset '$cs' not available. (Available are: $CHARSETS_AVAILABLE).
50
See the Installation chapter in the Reference Manual.])
55
default_charset_collations=""
57
case $default_charset in
59
default_charset_default_collation="utf8_general_ci"
60
define(UTFC1, utf8_general_ci utf8_bin)
61
define(UTFC2, utf8_czech_ci utf8_danish_ci)
62
define(UTFC3, utf8_esperanto_ci utf8_estonian_ci utf8_icelandic_ci)
63
define(UTFC4, utf8_latvian_ci utf8_lithuanian_ci)
64
define(UTFC5, utf8_persian_ci utf8_polish_ci utf8_romanian_ci)
65
define(UTFC6, utf8_sinhala_ci utf8_slovak_ci utf8_slovenian_ci)
66
define(UTFC7, utf8_spanish2_ci utf8_spanish_ci)
67
define(UTFC8, utf8_swedish_ci utf8_turkish_ci)
68
define(UTFC9, utf8_unicode_ci)
69
UTFC="UTFC1 UTFC2 UTFC3 UTFC4 UTFC5 UTFC6 UTFC7 UTFC8 UTFC9"
70
default_charset_collations="$UTFC"
73
default_charset_default_collation="utf8mb3_general_ci"
74
if test "$default_collation" = "utf8mb3_general_cs"; then
75
# For those who explicitly desire "utf8mb3_general_cs", support it,
76
# and then also set the CPP switch enabling that code.
77
UTFC="utf8mb3_general_cs"
78
AC_DEFINE([HAVE_UTF8_GENERAL_CS], [1], [certain Japanese customer])
80
define(UTFC1, utf8mb3_general_ci utf8mb3_bin)
81
define(UTFC2, utf8mb3_czech_ci utf8mb3_danish_ci)
82
define(UTFC3, utf8mb3_esperanto_ci utf8mb3_estonian_ci utf8mb3_icelandic_ci)
83
define(UTFC4, utf8mb3_latvian_ci utf8mb3_lithuanian_ci)
84
define(UTFC5, utf8mb3_persian_ci utf8mb3_polish_ci utf8mb3_romanian_ci)
85
define(UTFC6, utf8mb3_sinhala_ci utf8mb3_slovak_ci utf8mb3_slovenian_ci)
86
define(UTFC7, utf8mb3_spanish2_ci utf8mb3_spanish_ci)
87
define(UTFC8, utf8mb3_swedish_ci utf8mb3_turkish_ci)
88
define(UTFC9, utf8mb3_unicode_ci)
89
UTFC="UTFC1 UTFC2 UTFC3 UTFC4 UTFC5 UTFC6 UTFC7 UTFC8 UTFC9"
91
default_charset_collations="$UTFC"
94
AC_MSG_ERROR([Charset $cs not available. (Available are: $CHARSETS_AVAILABLE).
95
See the Installation chapter in the Reference Manual.])
98
if test "$default_collation" = default; then
99
default_collation=$default_charset_default_collation
102
valid_default_collation=no
103
for cl in $default_charset_collations
105
if test x"$cl" = x"$default_collation"
107
valid_default_collation=yes
112
if test x$valid_default_collation = xyes
114
AC_MSG_RESULT([default: $default_charset, collation: $default_collation; compiled in: $CHARSETS])
117
Collation $default_collation is not valid for character set $default_charset.
118
Valid collations are: $default_charset_collations.
119
See the Installation chapter in the Reference Manual.
123
AC_DEFINE_UNQUOTED([DRIZZLE_DEFAULT_CHARSET_NAME], ["$default_charset"],
124
[Define the default charset name])
125
AC_DEFINE_UNQUOTED([DRIZZLE_DEFAULT_COLLATION_NAME], ["$default_collation"],
126
[Define the default charset name])