summaryrefslogtreecommitdiffstats
path: root/unix/tcl.m4
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-02-04 11:15:42 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-02-04 11:15:42 (GMT)
commitb16a5a900917cb28a44b7cee5a7252b4ab5a8253 (patch)
treec8e0050610e9b523b57cef4db838bcb224c35450 /unix/tcl.m4
parent7f513ab3af116a0d77cc0cd829993edd3a570b50 (diff)
parent0d69fc832e95cff706d7bb039e2ff329b8c5d202 (diff)
downloadtcl-b16a5a900917cb28a44b7cee5a7252b4ab5a8253.zip
tcl-b16a5a900917cb28a44b7cee5a7252b4ab5a8253.tar.gz
tcl-b16a5a900917cb28a44b7cee5a7252b4ab5a8253.tar.bz2
Merge 8.7
Diffstat (limited to 'unix/tcl.m4')
-rw-r--r--unix/tcl.m470
1 files changed, 39 insertions, 31 deletions
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 511bfa1..74006f4 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -960,7 +960,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
CFLAGS_DEBUG=-g
AS_IF([test "$GCC" = yes], [
CFLAGS_OPTIMIZE=-O2
- CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith -finput-charset=UTF-8"
+ CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith"
case "${CC}" in
*++|*++-*)
;;
@@ -1838,36 +1838,44 @@ dnl # preprocessing tests use only CPPFLAGS.
TCL_LIBS="${DL_LIBS} ${LIBS} ${MATH_LIBS}"])
AC_SUBST(TCL_LIBS)
- # See if the compiler supports casting to a union type.
- # This is used to stop gcc from printing a compiler
- # warning when initializing a union member.
-
- AC_CACHE_CHECK(for cast to union support,
- tcl_cv_cast_to_union,
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
- union foo { int i; double d; };
- union foo f = (union foo) (int) 0;
- ]])],
- [tcl_cv_cast_to_union=yes],
- [tcl_cv_cast_to_union=no])
- )
- if test "$tcl_cv_cast_to_union" = "yes"; then
- AC_DEFINE(HAVE_CAST_TO_UNION, 1,
- [Defined when compiler supports casting to union type.])
- fi
- hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fno-lto"
- AC_CACHE_CHECK(for working -fno-lto,
- ac_cv_nolto,
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
- [ac_cv_nolto=yes],
- [ac_cv_nolto=no])
- )
- CFLAGS=$hold_cflags
- if test "$ac_cv_nolto" = "yes" ; then
- CFLAGS_NOLTO="-fno-lto"
- else
- CFLAGS_NOLTO=""
- fi
+ # See if the compiler supports casting to a union type.
+ # This is used to stop gcc from printing a compiler
+ # warning when initializing a union member.
+
+ AC_CACHE_CHECK(for cast to union support,
+ tcl_cv_cast_to_union,
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
+ union foo { int i; double d; };
+ union foo f = (union foo) (int) 0;
+ ]])],
+ [tcl_cv_cast_to_union=yes],
+ [tcl_cv_cast_to_union=no])
+ )
+ if test "$tcl_cv_cast_to_union" = "yes"; then
+ AC_DEFINE(HAVE_CAST_TO_UNION, 1,
+ [Defined when compiler supports casting to union type.])
+ fi
+ hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fno-lto"
+ AC_CACHE_CHECK(for working -fno-lto,
+ ac_cv_nolto,
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
+ [ac_cv_nolto=yes],
+ [ac_cv_nolto=no])
+ )
+ CFLAGS=$hold_cflags
+ if test "$ac_cv_nolto" = "yes" ; then
+ CFLAGS_NOLTO="-fno-lto"
+ 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
+ CFLAGS="$CFLAGS -finput-charset=UTF-8"
+ fi
AC_CHECK_HEADER(stdbool.h, [AC_DEFINE(HAVE_STDBOOL_H, 1, [Do we have <stdbool.h>?])],)