1
0
mirror of https://github.com/MariaDB/server.git synced 2025-05-28 13:01:41 +03:00

A way not to compile UCA collations

This commit is contained in:
bar@mysql.com 2005-02-18 12:58:16 +04:00
parent 3c700572b4
commit c926e43f65
4 changed files with 31 additions and 2 deletions

View File

@ -2811,6 +2811,24 @@ AC_DEFINE_UNQUOTED([MYSQL_DEFAULT_CHARSET_NAME], ["$default_charset"],
AC_DEFINE_UNQUOTED([MYSQL_DEFAULT_COLLATION_NAME], ["$default_collation"],
[Define the default charset name])
# Shall we build the UCA-based Unicode collations
AC_ARG_WITH(uca,
[ --without-uca Skip building of the national Unicode collations.],
[with_uca=$withval],
[with_uca=yes]
)
AC_MSG_CHECKING([whether to compile national Unicode collations])
if test "$with_uca" = "yes"
then
AC_MSG_RESULT(yes)
AC_DEFINE([HAVE_UCA_COLLATIONS], [1], [national Unicode collations])
else
AC_MSG_RESULT(no)
fi
MYSQL_CHECK_ISAM
MYSQL_CHECK_BDB
MYSQL_CHECK_INNODB

View File

@ -22,6 +22,8 @@
init_compiled_charsets() that only adds those that he wants
*/
#ifdef HAVE_UCA_COLLATIONS
#ifdef HAVE_CHARSET_ucs2
extern CHARSET_INFO my_charset_ucs2_general_uca;
extern CHARSET_INFO my_charset_ucs2_icelandic_uca_ci;
@ -62,6 +64,8 @@ extern CHARSET_INFO my_charset_utf8_roman_uca_ci;
extern CHARSET_INFO my_charset_utf8_persian_uca_ci;
#endif
#endif /* HAVE_UCA_COLLATIONS */
my_bool init_compiled_charsets(myf flags __attribute__((unused)))
{
CHARSET_INFO *cs;
@ -113,6 +117,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
#ifdef HAVE_CHARSET_ucs2
add_compiled_collation(&my_charset_ucs2_general_ci);
add_compiled_collation(&my_charset_ucs2_bin);
#ifdef HAVE_UCA_COLLATIONS
add_compiled_collation(&my_charset_ucs2_general_uca);
add_compiled_collation(&my_charset_ucs2_icelandic_uca_ci);
add_compiled_collation(&my_charset_ucs2_latvian_uca_ci);
@ -131,6 +136,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
add_compiled_collation(&my_charset_ucs2_roman_uca_ci);
add_compiled_collation(&my_charset_ucs2_persian_uca_ci);
#endif
#endif
#ifdef HAVE_CHARSET_ujis
add_compiled_collation(&my_charset_ujis_japanese_ci);
@ -140,6 +146,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
#ifdef HAVE_CHARSET_utf8
add_compiled_collation(&my_charset_utf8_general_ci);
add_compiled_collation(&my_charset_utf8_bin);
#ifdef HAVE_UCA_COLLATIONS
add_compiled_collation(&my_charset_utf8_general_uca_ci);
add_compiled_collation(&my_charset_utf8_icelandic_uca_ci);
add_compiled_collation(&my_charset_utf8_latvian_uca_ci);
@ -157,6 +164,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
add_compiled_collation(&my_charset_utf8_spanish2_uca_ci);
add_compiled_collation(&my_charset_utf8_roman_uca_ci);
add_compiled_collation(&my_charset_utf8_persian_uca_ci);
#endif
#endif
/* Copy compiled charsets */

View File

@ -215,7 +215,7 @@ static int add_collation(CHARSET_INFO *cs)
if (!strcmp(cs->csname,"ucs2") )
{
#ifdef HAVE_CHARSET_ucs2
#if defined(HAVE_CHARSET_ucs2) && defined(HAVE_UCA_COLLATIONS)
new->cset= my_charset_ucs2_general_uca.cset;
new->coll= my_charset_ucs2_general_uca.coll;
new->strxfrm_multiply= my_charset_ucs2_general_uca.strxfrm_multiply;

View File

@ -36,6 +36,7 @@
#include "m_string.h"
#include "m_ctype.h"
#ifdef HAVE_UCA_COLLATIONS
#define MY_UCA_NPAGES 256
#define MY_UCA_NCHARS 256
@ -8990,4 +8991,6 @@ CHARSET_INFO my_charset_utf8_persian_uca_ci=
&my_collation_any_uca_handler
};
#endif
#endif /* HAVE_CHARSET_utf8 */
#endif /* HAVE_UCA_COLLATIONS */