initial version of UTF-8 strings representation (still converting to wchar_t* a lot); it has to be explicitly enabled with --enable-utf8 for now

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2007-04-12 21:15:07 +00:00
parent 5b077ec744
commit 817270659e
18 changed files with 1286 additions and 257 deletions

372
configure vendored
View File

@@ -1639,6 +1639,7 @@ Optional Features:
--enable-optimise create optimised code
--enable-debug same as debug_flag and debug_info
--enable-stl use STL for containers
--enable-extended_rtti use extended RTTI (XTI)
--enable-omf use OMF object format
--enable-debug_flag set __WXDEBUG__ flag (recommended for developers!)
--enable-debug_info create code with debugging information
@@ -1688,6 +1689,7 @@ Optional Features:
--enable-longlong use wxLongLong class
--enable-mimetype use wxMimeTypesManager
--enable-mslu use MS Layer for Unicode on Windows 9x (Win32 only)
--enable-utf8 use UTF-8 representation for strings (Unix only)
--enable-snglinst use wxSingleInstanceChecker class
--enable-std_iostreams use standard C++ stream classes
--enable-std_string use standard C++ string classes
@@ -2900,6 +2902,7 @@ DEBUG_CONFIGURE=0
if test $DEBUG_CONFIGURE = 1; then
DEFAULT_wxUSE_UNIVERSAL=no
DEFAULT_wxUSE_STL=no
DEFAULT_wxUSE_EXTENDED_RTTI=no
DEFAULT_wxUSE_NANOX=no
@@ -3106,6 +3109,7 @@ if test $DEBUG_CONFIGURE = 1; then
DEFAULT_wxUSE_UNICODE=no
DEFAULT_wxUSE_UNICODE_MSLU=no
DEFAULT_wxUSE_UNICODE_UTF8=no
DEFAULT_wxUSE_WCSRTOMBS=no
DEFAULT_wxUSE_PALETTE=no
@@ -3125,6 +3129,7 @@ if test $DEBUG_CONFIGURE = 1; then
else
DEFAULT_wxUSE_UNIVERSAL=no
DEFAULT_wxUSE_STL=no
DEFAULT_wxUSE_EXTENDED_RTTI=no
DEFAULT_wxUSE_NANOX=no
@@ -3330,6 +3335,7 @@ else
DEFAULT_wxUSE_UNICODE=no
DEFAULT_wxUSE_UNICODE_MSLU=yes
DEFAULT_wxUSE_UNICODE_UTF8=no
DEFAULT_wxUSE_WCSRTOMBS=no
DEFAULT_wxUSE_PALETTE=yes
@@ -4675,6 +4681,47 @@ echo "${ECHO_T}yes" >&6; }
echo "${ECHO_T}no" >&6; }
fi
enablestring=
{ echo "$as_me:$LINENO: checking for --${enablestring:-enable}-extended_rtti" >&5
echo $ECHO_N "checking for --${enablestring:-enable}-extended_rtti... $ECHO_C" >&6; }
no_cache=0
# Check whether --enable-extended_rtti was given.
if test "${enable_extended_rtti+set}" = set; then
enableval=$enable_extended_rtti;
if test "$enableval" = yes; then
ac_cv_use_extended_rtti='wxUSE_EXTENDED_RTTI=yes'
else
ac_cv_use_extended_rtti='wxUSE_EXTENDED_RTTI=no'
fi
else
LINE=`grep "wxUSE_EXTENDED_RTTI" ${wx_arg_cache_file}`
if test "x$LINE" != x ; then
eval "DEFAULT_$LINE"
else
no_cache=1
fi
ac_cv_use_extended_rtti='wxUSE_EXTENDED_RTTI='$DEFAULT_wxUSE_EXTENDED_RTTI
fi
eval "$ac_cv_use_extended_rtti"
if test "$no_cache" != 1; then
echo $ac_cv_use_extended_rtti >> ${wx_arg_cache_file}.tmp
fi
if test "$wxUSE_EXTENDED_RTTI" = yes; then
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
else
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi
if test "$USE_OS2" = "1"; then
DEFAULT_wxUSE_OMF=no
@@ -6698,6 +6745,47 @@ echo "${ECHO_T}no" >&6; }
fi
enablestring=
{ echo "$as_me:$LINENO: checking for --${enablestring:-enable}-utf8" >&5
echo $ECHO_N "checking for --${enablestring:-enable}-utf8... $ECHO_C" >&6; }
no_cache=0
# Check whether --enable-utf8 was given.
if test "${enable_utf8+set}" = set; then
enableval=$enable_utf8;
if test "$enableval" = yes; then
ac_cv_use_utf8='wxUSE_UNICODE_UTF8=yes'
else
ac_cv_use_utf8='wxUSE_UNICODE_UTF8=no'
fi
else
LINE=`grep "wxUSE_UNICODE_UTF8" ${wx_arg_cache_file}`
if test "x$LINE" != x ; then
eval "DEFAULT_$LINE"
else
no_cache=1
fi
ac_cv_use_utf8='wxUSE_UNICODE_UTF8='$DEFAULT_wxUSE_UNICODE_UTF8
fi
eval "$ac_cv_use_utf8"
if test "$no_cache" != 1; then
echo $ac_cv_use_utf8 >> ${wx_arg_cache_file}.tmp
fi
if test "$wxUSE_UNICODE_UTF8" = yes; then
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
else
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi
enablestring=
{ echo "$as_me:$LINENO: checking for --${enablestring:-enable}-snglinst" >&5
echo $ECHO_N "checking for --${enablestring:-enable}-snglinst... $ECHO_C" >&6; }
@@ -22380,13 +22468,11 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <sys/types.h> /* for off_t */
#include <stdio.h>
#include <stdio.h>
int
main ()
{
int (*fp) (FILE *, off_t, int) = fseeko;
return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
;
return 0;
}
@@ -22426,13 +22512,11 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#define _LARGEFILE_SOURCE 1
#include <sys/types.h> /* for off_t */
#include <stdio.h>
#include <stdio.h>
int
main ()
{
int (*fp) (FILE *, off_t, int) = fseeko;
return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
;
return 0;
}
@@ -39268,7 +39352,6 @@ echo $ECHO_N "checking how many arguments gethostbyname_r() takes... $ECHO_C" >&
else
################################################################
ac_cv_func_which_gethostbyname_r=unknown
@@ -39498,7 +39581,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
################################################################
fi
@@ -39647,19 +39729,94 @@ _ACEOF
fi
fi
{ echo "$as_me:$LINENO: checking how many arguments getservbyname_r() takes" >&5
echo $ECHO_N "checking how many arguments getservbyname_r() takes... $ECHO_C" >&6; }
{ echo "$as_me:$LINENO: checking for getservbyname_r" >&5
echo $ECHO_N "checking for getservbyname_r... $ECHO_C" >&6; }
if test "${ac_cv_func_which_getservbyname_r+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
{ echo "$as_me:$LINENO: checking for getservbyname_r" >&5
echo $ECHO_N "checking for getservbyname_r... $ECHO_C" >&6; }
if test "${ac_cv_func_getservbyname_r+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Define getservbyname_r to an innocuous variant, in case <limits.h> declares getservbyname_r.
For example, HP-UX 11i <limits.h> declares gettimeofday. */
#define getservbyname_r innocuous_getservbyname_r
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char getservbyname_r (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
#undef getservbyname_r
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char getservbyname_r ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined __stub_getservbyname_r || defined __stub___getservbyname_r
choke me
#endif
int
main ()
{
return getservbyname_r ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
ac_cv_func_getservbyname_r=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_func_getservbyname_r=no
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_func_getservbyname_r" >&5
echo "${ECHO_T}$ac_cv_func_getservbyname_r" >&6; }
if test $ac_cv_func_getservbyname_r = yes; then
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -39667,17 +39824,20 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <netdb.h>
# include <netdb.h>
int
main ()
{
char *name;
char *proto;
struct servent *se, *res;
char buffer[2048];
int buflen = 2048;
(void) getservbyname_r(name, proto, se, buffer, buflen, &res)
char *name;
char *proto;
struct servent *se;
struct servent_data data;
(void) getservbyname_r(name, proto, se, &data);
;
return 0;
@@ -39697,7 +39857,54 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_cxx_werror_flag" ||
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_func_which_getservbyname_r=four
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
# include <netdb.h>
int
main ()
{
char *name;
char *proto;
struct servent *se, *res;
char buffer[2048];
int buflen = 2048;
(void) getservbyname_r(name, proto, se, buffer, buflen, &res)
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_func_which_getservbyname_r=six
@@ -39706,23 +39913,25 @@ else
sed 's/^/| /' conftest.$ac_ext >&5
cat >conftest.$ac_ext <<_ACEOF
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <netdb.h>
# include <netdb.h>
int
main ()
{
char *name;
char *proto;
struct servent *se;
char buffer[2048];
int buflen = 2048;
(void) getservbyname_r(name, proto, se, buffer, buflen)
char *name;
char *proto;
struct servent *se;
char buffer[2048];
int buflen = 2048;
(void) getservbyname_r(name, proto, se, buffer, buflen)
;
return 0;
@@ -39742,7 +39951,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_cxx_werror_flag" ||
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_func_which_getservbyname_r=five
@@ -39750,51 +39959,13 @@ else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <netdb.h>
int
main ()
{
char *name;
char *proto;
struct servent *se;
struct servent_data data;
(void) getservbyname_r(name, proto, se, &data);
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_cxx_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_func_which_getservbyname_r=four
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_func_which_getservbyname_r=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
@@ -39805,18 +39976,10 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
ac_cv_func_which_getservbyname_r=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
fi
{ echo "$as_me:$LINENO: result: $ac_cv_func_which_getservbyname_r" >&5
echo "${ECHO_T}$ac_cv_func_which_getservbyname_r" >&6; }
@@ -39836,6 +39999,7 @@ elif test $ac_cv_func_which_getservbyname_r = four; then
#define HAVE_FUNC_GETSERVBYNAME_R_4 1
_ACEOF
fi
@@ -40715,6 +40879,13 @@ _ACEOF
fi
if test "$wxUSE_EXTENDED_RTTI" = "yes"; then
cat >>confdefs.h <<\_ACEOF
#define wxUSE_EXTENDED_RTTI 1
_ACEOF
fi
if test "$wxUSE_APPLE_IEEE" = "yes"; then
cat >>confdefs.h <<\_ACEOF
#define wxUSE_APPLE_IEEE 1
@@ -43476,6 +43647,13 @@ fi
fi
fi
if test "$wxUSE_UNICODE" = "yes" -a "$wxUSE_UNICODE_UTF8" = "yes"; then
cat >>confdefs.h <<\_ACEOF
#define wxUSE_UNICODE_UTF8 1
_ACEOF
fi
if test "$wxUSE_wxUSE_EXPERIMENTAL_PRINTF" = "yes"; then
cat >>confdefs.h <<\_ACEOF
#define wxUSE_EXPERIMENTAL_PRINTF 1
@@ -46113,7 +46291,10 @@ echo "${ECHO_T}$bakefile_cv_prog_makeisgnu" >&6; }
PLATFORM_BEOS=1
;;
* )
;;
{ { echo "$as_me:$LINENO: error: Unknown platform: $BAKEFILE_FORCE_PLATFORM" >&5
echo "$as_me: error: Unknown platform: $BAKEFILE_FORCE_PLATFORM" >&2;}
{ (exit 1); exit 1; }; }
;;
esac
fi
@@ -48857,10 +49038,21 @@ echo "${ECHO_T}no" >&6; }
cppunit_major_min=`echo $cppunit_version_min | \
sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
if test "x${cppunit_major_min}" = "x" ; then
cppunit_major_min=0
fi
cppunit_minor_min=`echo $cppunit_version_min | \
sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
if test "x${cppunit_minor_min}" = "x" ; then
cppunit_minor_min=0
fi
cppunit_micro_min=`echo $cppunit_version_min | \
sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
if test "x${cppunit_micro_min}" = "x" ; then
cppunit_micro_min=0
fi
cppunit_version_proper=`expr \
$cppunit_major_version \> $cppunit_major_min \| \