added --enable-wchar-prefer-char16

This commit is contained in:
hyung-hwan 2018-01-30 04:17:26 +00:00
parent 2fbfe3a71b
commit 3a9e278f0b
5 changed files with 56 additions and 13 deletions

20
qse/configure vendored
View File

@ -860,6 +860,7 @@ enable_ltdl_install
enable_ssl
with_mysql
enable_wchar
enable_wchar_prefer_char16
enable_bundled_unicode
enable_xcmgrs
enable_syscall
@ -1518,6 +1519,9 @@ Optional Features:
--enable-ssl build the library in the ssl mode (default. yes)
--enable-wchar Use the wide character type as the default charater
type when enabled (default. yes)
--enable-wchar-prefer-char16
Use char16_t for qse_wchar_t if possible(default.
no)
--enable-bundled-unicode
use thn bundled unicode routines (default. no)
--enable-xcmgrs include more built-in cmgrs like cp949 and cp950
@ -23600,6 +23604,22 @@ else
fi
# Check whether --enable-wchar-prefer-char16 was given.
if test "${enable_wchar_prefer_char16+set}" = set; then :
enableval=$enable_wchar_prefer_char16; enable_wchar_prefer_char16=$enableval
else
enable_wchar_prefer_char16=no
fi
if test "${enable_wchar_prefer_char16}" = "yes"
then
$as_echo "#define QSE_WCHAR_PREFER_CHAR16 /**/" >>confdefs.h
fi
# Check whether --enable-bundled-unicode was given.
if test "${enable_bundled_unicode+set}" = set; then :
enableval=$enable_bundled_unicode; enable_bundled_unicode_is=$enableval

View File

@ -725,6 +725,15 @@ else
fi
AM_CONDITIONAL(WCHAR, test "${enable_wchar_is}" = "yes")
AC_ARG_ENABLE([wchar-prefer-char16], [AS_HELP_STRING([--enable-wchar-prefer-char16],[Use char16_t for qse_wchar_t if possible(default. no)])],
enable_wchar_prefer_char16=$enableval,enable_wchar_prefer_char16=no)
if test "${enable_wchar_prefer_char16}" = "yes"
then
AC_DEFINE([QSE_WCHAR_PREFER_CHAR16],[],[specify preference for char16_t as qse_wchar_t])
fi
AC_ARG_ENABLE([bundled-unicode], [AS_HELP_STRING([--enable-bundled-unicode],[use thn bundled unicode routines (default. no)])],
enable_bundled_unicode_is=$enableval,enable_bundled_unicode_is=yes)
if test "${ac_cv_header_wctype_h}" = "no" -o "${ac_cv_func_wctrans}" = "no" -o "${ac_cv_func_wctype}" = "no"

View File

@ -1071,6 +1071,9 @@
/* use the syscall() function to invoke a system call */
#undef QSE_USE_SYSCALL
/* specify preference for char16_t as qse_wchar_t */
#undef QSE_WCHAR_PREFER_CHAR16
/* The size of `char', as computed by sizeof. */
#undef SIZEOF_CHAR

View File

@ -537,13 +537,12 @@ typedef int qse_mcint_t;
* #QSE_WCHAR_EOF.
*/
#if /*defined(QSE_PREFER_CHAR16_T) &&*/ defined(__GNUC__) && defined(__CHAR16_TYPE__) && \
#if defined(QSE_WCHAR_PREFER_CHAR16) && defined(__GNUC__) && defined(__CHAR16_TYPE__) && \
defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
/* C11 */
typedef __CHAR16_TYPE__ qse_wchar_t;
typedef qse_uint16_t qse_wchau_t;
#if (QSE_SIZEOF_INT > 2)
typedef int qse_wcint_t;
#else

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -14,7 +14,17 @@
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
@ -78,19 +88,18 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = tools
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/argz.m4 \
$(top_srcdir)/m4/ax_check_sign.m4 \
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_sign.m4 \
$(top_srcdir)/m4/ax_cxx_namespace.m4 \
$(top_srcdir)/m4/ax_lib_mysql.m4 $(top_srcdir)/m4/ax_numval.m4 \
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/ltargz.m4 $(top_srcdir)/m4/ltdl.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/lx_find_mpi.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/include/qse/config.h
CONFIG_CLEAN_FILES =
@ -117,12 +126,12 @@ am__can_run_installinfo = \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
ARGZ_H = @ARGZ_H@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@ -177,9 +186,11 @@ LTDLDEPS = @LTDLDEPS@
LTDLINCL = @LTDLINCL@
LTDLOPEN = @LTDLOPEN@
LTLIBOBJS = @LTLIBOBJS@
LT_ARGZ_H = @LT_ARGZ_H@
LT_CONFIG_H = @LT_CONFIG_H@
LT_DLLOADERS = @LT_DLLOADERS@
LT_DLPREOPEN = @LT_DLPREOPEN@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
@ -314,7 +325,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign tools/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@ -489,6 +499,8 @@ uninstall-am:
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags-am uninstall uninstall-am
.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.