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"
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_MSG_ERROR([Charset '$cs' not available. (Available are: $CHARSETS_AVAILABLE).
45
See the Installation chapter in the Reference Manual.])
50
default_charset_collations=""
52
case $default_charset in
54
default_charset_default_collation="utf8_general_ci"
55
define(UTFC1, utf8_general_ci utf8_bin)
56
define(UTFC2, utf8_czech_ci utf8_danish_ci)
57
define(UTFC3, utf8_esperanto_ci utf8_estonian_ci utf8_icelandic_ci)
58
define(UTFC4, utf8_latvian_ci utf8_lithuanian_ci)
59
define(UTFC5, utf8_persian_ci utf8_polish_ci utf8_romanian_ci)
60
define(UTFC6, utf8_sinhala_ci utf8_slovak_ci utf8_slovenian_ci)
61
define(UTFC7, utf8_spanish2_ci utf8_spanish_ci)
62
define(UTFC8, utf8_swedish_ci utf8_turkish_ci)
63
define(UTFC9, utf8_unicode_ci)
64
UTFC="UTFC1 UTFC2 UTFC3 UTFC4 UTFC5 UTFC6 UTFC7 UTFC8 UTFC9"
65
default_charset_collations="$UTFC"
68
AC_MSG_ERROR([Charset $cs not available. (Available are: $CHARSETS_AVAILABLE).
69
See the Installation chapter in the Reference Manual.])
72
if test "$default_collation" = default; then
73
default_collation=$default_charset_default_collation
76
valid_default_collation=no
77
for cl in $default_charset_collations
79
if test x"$cl" = x"$default_collation"
81
valid_default_collation=yes
86
if test x$valid_default_collation = xyes
88
AC_MSG_RESULT([default: $default_charset, collation: $default_collation; compiled in: $CHARSETS])
91
Collation $default_collation is not valid for character set $default_charset.
92
Valid collations are: $default_charset_collations.
93
See the Installation chapter in the Reference Manual.
97
AC_DEFINE_UNQUOTED([DRIZZLE_DEFAULT_CHARSET_NAME], ["$default_charset"],
98
[Define the default charset name])
99
AC_DEFINE_UNQUOTED([DRIZZLE_DEFAULT_COLLATION_NAME], ["$default_collation"],
100
[Define the default charset name])