43
dnl check for availability of multibyte characters and functions
44
dnl (Based on BASH_CHECK_MULTIBYTE in aclocal.m4 of readline-5.0)
46
AC_DEFUN([DRIZZLE_CHECK_MULTIBYTE],
48
AC_CHECK_HEADERS(wctype.h)
49
AC_CHECK_HEADERS(wchar.h)
50
AC_CHECK_HEADERS(langinfo.h)
52
AC_CHECK_FUNC(mbsrtowcs, AC_DEFINE([HAVE_MBSRTOWCS],[],[Define if you have mbsrtowcs]))
53
AC_CHECK_FUNC(mbrtowc, AC_DEFINE([HAVE_MBRTOWC],[],[Define if you have mbrtowc]))
54
AC_CHECK_FUNC(mbrlen, AC_DEFINE([HAVE_MBRLEN],[],[Define if you have mbrlen]))
55
AC_CHECK_FUNC(wctomb, AC_DEFINE([HAVE_WCTOMB],[],[Define if you have wctomb]))
56
AC_CHECK_FUNC(wcwidth, AC_DEFINE([HAVE_WCWIDTH],[],[Define if you have wcwidth]))
57
AC_CHECK_FUNC(wcsdup, AC_DEFINE([HAVE_WCSDUP],[],[Define if you check wcsdup]))
59
AC_CACHE_CHECK([for mbstate_t], mysql_cv_have_mbstate_t,
61
#include <wchar.h>], [
65
], mysql_cv_have_mbstate_t=yes, mysql_cv_have_mbstate_t=no)])
66
if test $mysql_cv_have_mbstate_t = yes; then
67
AC_DEFINE([HAVE_MBSTATE_T],[],[Define if mysql_cv_have_mbstate_t=yes])
70
AC_CACHE_CHECK([for nl_langinfo and CODESET], mysql_cv_langinfo_codeset,
72
[#include <langinfo.h>],
73
[char* cs = nl_langinfo(CODESET);],
74
mysql_cv_langinfo_codeset=yes, mysql_cv_langinfo_codeset=no)])
75
if test $mysql_cv_langinfo_codeset = yes; then
76
AC_DEFINE([HAVE_LANGINFO_CODESET],[],[Define if mysql_cv_langinfo_codeset=yes])