summaryrefslogtreecommitdiffstats
path: root/unix/configure
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-07-05 09:03:12 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-07-05 09:03:12 (GMT)
commit30b0dabb9b5092b7453ff56eae75c009f30eaa1f (patch)
treee95abf5ef1adf6677e12d167fb247fc671a8d556 /unix/configure
parent26a830241ea90ce41d6cddc8f2a720f4cc5b2e73 (diff)
downloadtcl-30b0dabb9b5092b7453ff56eae75c009f30eaa1f.zip
tcl-30b0dabb9b5092b7453ff56eae75c009f30eaa1f.tar.gz
tcl-30b0dabb9b5092b7453ff56eae75c009f30eaa1f.tar.bz2
Improvement: always export both 16-bit and 32-bit UTF function
Diffstat (limited to 'unix/configure')
-rwxr-xr-xunix/configure39
1 files changed, 39 insertions, 0 deletions
diff --git a/unix/configure b/unix/configure
index 2de5b54..a35cde4 100755
--- a/unix/configure
+++ b/unix/configure
@@ -3930,6 +3930,45 @@ done
#------------------------------------------------------------------------
+# If we're using GCC, see if the compiler understands -fshort-wchar. If so, use it.
+# It makes sure you can use the wchar_t type interchangable with Tcl_UniChar
+#------------------------------------------------------------------------
+
+if test -z "$no_short_wchar" && test -n "$GCC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler understands -fshort-wchar" >&5
+$as_echo_n "checking if the compiler understands -fshort-wchar... " >&6; }
+if ${tcl_cv_cc_short_wchar+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fshort-wchar"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ tcl_cv_cc_short_wchar=yes
+else
+ tcl_cv_cc_short_wchar=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS=$hold_cflags
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_short_wchar" >&5
+$as_echo "$tcl_cv_cc_short_wchar" >&6; }
+ if test $tcl_cv_cc_short_wchar = yes; then
+ CFLAGS="$CFLAGS -fshort-wchar"
+ fi
+fi
+
+#------------------------------------------------------------------------
# If we're using GCC, see if the compiler understands -pipe. If so, use it.
# It makes compiling go faster. (This is only a performance feature.)
#------------------------------------------------------------------------