summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-02-04 11:34:40 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-02-04 11:34:40 (GMT)
commit35166b815b524f015c27c908257e19e12c0686e1 (patch)
tree67d1979cac527a90f5dc8b7908afacbfc02ce1dc /win
parenta863d3b9c66311d89d572a0bafe3f300af22c9a6 (diff)
downloadtk-35166b815b524f015c27c908257e19e12c0686e1.zip
tk-35166b815b524f015c27c908257e19e12c0686e1.tar.gz
tk-35166b815b524f015c27c908257e19e12c0686e1.tar.bz2
Sync */tcl.m4 with Tcl
Diffstat (limited to 'win')
-rwxr-xr-xwin/configure35
-rw-r--r--win/tcl.m410
2 files changed, 43 insertions, 2 deletions
diff --git a/win/configure b/win/configure
index dcbfede..d80d32d 100755
--- a/win/configure
+++ b/win/configure
@@ -4432,6 +4432,39 @@ printf "%s\n" "$ac_cv_nolto" >&6; }
else
CFLAGS_NOLTO=""
fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the compiler understands -finput-charset" >&5
+printf %s "checking if the compiler understands -finput-charset... " >&6; }
+if test ${tcl_cv_cc_input_charset+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -finput-charset=UTF-8"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ tcl_cv_cc_input_charset=yes
+else $as_nop
+ tcl_cv_cc_input_charset=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ CFLAGS=$hold_cflags
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_input_charset" >&5
+printf "%s\n" "$tcl_cv_cc_input_charset" >&6; }
+ if test $tcl_cv_cc_input_charset = yes; then
+ extra_cflags="$extra_cflags -finput-charset=UTF-8"
+ fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking compiler flags" >&5
@@ -4495,7 +4528,7 @@ printf "%s\n" "using shared flags" >&6; }
CFLAGS_DEBUG=-g
CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
- CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith -finput-charset=UTF-8"
+ CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith"
LDFLAGS_DEBUG=
LDFLAGS_OPTIMIZE=
diff --git a/win/tcl.m4 b/win/tcl.m4
index 852aa33..b9a164c 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -617,6 +617,14 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
else
CFLAGS_NOLTO=""
fi
+ AC_CACHE_CHECK([if the compiler understands -finput-charset],
+ tcl_cv_cc_input_charset, [
+ hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -finput-charset=UTF-8"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[tcl_cv_cc_input_charset=yes],[tcl_cv_cc_input_charset=no])
+ CFLAGS=$hold_cflags])
+ if test $tcl_cv_cc_input_charset = yes; then
+ extra_cflags="$extra_cflags -finput-charset=UTF-8"
+ fi
fi
AC_MSG_CHECKING([compiler flags])
@@ -677,7 +685,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
CFLAGS_DEBUG=-g
CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
- CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith -finput-charset=UTF-8"
+ CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith"
LDFLAGS_DEBUG=
LDFLAGS_OPTIMIZE=