added --enable-unicode to configure.ac
cleaned up unnecessary code
This commit is contained in:
43
configure.ac
43
configure.ac
@ -234,6 +234,8 @@ AC_CHECK_SIZEOF(long double,,[[]])
|
||||
AC_CHECK_SIZEOF(__float128,,[[]])
|
||||
|
||||
AC_CHECK_SIZEOF(wchar_t)
|
||||
AC_CHECK_SIZEOF(char16_t)
|
||||
AC_CHECK_SIZEOF(char32_t)
|
||||
AC_CHECK_SIZEOF(off_t)
|
||||
AC_CHECK_SIZEOF(off64_t)
|
||||
|
||||
@ -404,6 +406,45 @@ else
|
||||
AC_SUBST(BUILD_MODE, "release")
|
||||
fi
|
||||
|
||||
|
||||
AC_ARG_ENABLE([override-uch],
|
||||
[AS_HELP_STRING([--enable-override-uch],[Use the specified unicode character type (default. no)])],
|
||||
enable_override_uch=$enableval,
|
||||
enable_override_uch=no
|
||||
)
|
||||
if test "${enable_override_uch}" = "wchar_t"
|
||||
then
|
||||
test "${ac_cv_sizeof_wchar_t}" = "0" && enable_override_uch=no
|
||||
test "${ac_cv_sizeof_wchar_t}" = "1" && enable_override_uch=no
|
||||
elif test "${enable_override_uch}" = "char16_t"
|
||||
then
|
||||
test "${ac_cv_sizeof_char16_t}" = "0" && enable_override_uch=no
|
||||
elif test "${enable_override_uch}" = "char32_t"
|
||||
then
|
||||
test "${ac_cv_sizeof_char32_t}" = "0" && enable_override_uch=no
|
||||
fi
|
||||
|
||||
if test "${enable_override_uch}" = "wchar_t"
|
||||
then
|
||||
AC_DEFINE([HCL_OVERRIDE_UCH_TYPE],[wchar_t],[unicode character type])
|
||||
elif test "${enable_override_uch}" = "char16_t"
|
||||
then
|
||||
AC_DEFINE([HCL_OVERRIDE_UCH_TYPE],[char16_t],[unicode character type])
|
||||
elif test "${enable_override_uch}" = "char32_t"
|
||||
then
|
||||
AC_DEFINE([HCL_OVERRIDE_UCH_TYPE],[char32_t],[unicode character type])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE([unicode],
|
||||
[AS_HELP_STRING([--enable-unicode],[Use the unicode character type as the default character type (default. yes)])],
|
||||
enable_unicode=$enableval,
|
||||
enable_unicode=yes
|
||||
)
|
||||
if test "${enable_unicode}" = "yes"
|
||||
then
|
||||
AC_DEFINE([HCL_ENABLE_UNICODE],[],[Use the unicode character type as the default character type])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE([cxx],
|
||||
[AS_HELP_STRING([--enable-cxx],[build the library for C++ if a C++ compiler is available (default. yes)])],
|
||||
enable_cxx_is=$enableval,
|
||||
@ -447,6 +488,8 @@ fi
|
||||
AM_CONDITIONAL(ENABLE_STATIC_MODULE, test "${enable_static_module_is}" = "yes")
|
||||
|
||||
AC_SUBST(HCL_SIZEOF_WCHAR_T, $ac_cv_sizeof_wchar_t)
|
||||
AC_SUBST(HCL_SIZEOF_CHAR16_T, $ac_cv_sizeof_char16_t)
|
||||
AC_SUBST(HCL_SIZEOF_CHAR32_T, $ac_cv_sizeof_char32_t)
|
||||
AC_SUBST(HCL_SIZEOF_LONG_LONG, $ac_cv_sizeof_long_long)
|
||||
AC_SUBST(HCL_SIZEOF_LONG, $ac_cv_sizeof_long)
|
||||
AC_SUBST(HCL_SIZEOF_INT, $ac_cv_sizeof_int)
|
||||
|
Reference in New Issue
Block a user