enhanced --enable-unicode to accept ucs4 and ucs2 in addition to yes/no.

redefined the moo_uch_t type to follow the enable-unicode value
This commit is contained in:
hyunghwan.chung
2018-02-21 10:11:39 +00:00
parent c16546c3df
commit ae0f559060
38 changed files with 73 additions and 47 deletions

14
moo/configure vendored
View File

@ -1504,7 +1504,8 @@ Optional Features:
--enable-ltdl-install install libltdl
--enable-debug build the library in the debug mode (default. no)
--enable-unicode Use the unicode character type as the default
character type (default. yes)
character type. one of yes, no, ucs2, ucs4 (default.
yes)
--enable-cxx build the library for C++ if a C++ compiler is
available (default. yes)
--enable-dynamic-module enable dynamic module capability(default. yes)
@ -22521,7 +22522,6 @@ $as_echo "#define MOO_BUILD_RELEASE 1" >>confdefs.h
fi
# Check whether --enable-unicode was given.
if test "${enable_unicode+set}" = set; then :
enableval=$enable_unicode; enable_unicode=$enableval
@ -22535,6 +22535,16 @@ then
$as_echo "#define MOO_ENABLE_UNICODE 1" >>confdefs.h
elif test "${enable_unicode}" = "ucs2"
then
$as_echo "#define MOO_ENABLE_UNICODE 2" >>confdefs.h
elif test "${enable_unicode}" = "ucs4"
then
$as_echo "#define MOO_ENABLE_UNICODE 4" >>confdefs.h
fi
# Check whether --enable-cxx was given.