Import Tcl 8.6.12

This commit is contained in:
Steve Dower
2021-11-08 17:30:58 +00:00
parent 1aadb2455c
commit 674867e7e6
608 changed files with 78089 additions and 60360 deletions

View File

@@ -28,7 +28,7 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [
# we reset no_tcl in case something fails here
no_tcl=true
AC_ARG_WITH(tcl,
AC_HELP_STRING([--with-tcl],
AS_HELP_STRING([--with-tcl],
[directory containing tcl configuration (tclConfig.sh)]),
with_tclconfig="${withval}")
AC_MSG_CHECKING([for Tcl configuration])
@@ -146,7 +146,7 @@ AC_DEFUN([SC_PATH_TKCONFIG], [
# we reset no_tk in case something fails here
no_tk=true
AC_ARG_WITH(tk,
AC_HELP_STRING([--with-tk],
AS_HELP_STRING([--with-tk],
[directory containing tk configuration (tkConfig.sh)]),
with_tkconfig="${withval}")
AC_MSG_CHECKING([for Tk configuration])
@@ -499,6 +499,7 @@ AC_DEFUN([SC_ENABLE_SYMBOLS], [
# CFLAGS_DEBUG
# CFLAGS_OPTIMIZE
# CFLAGS_WARNING
# CFLAGS_NOLTO
# LDFLAGS_DEBUG
# LDFLAGS_OPTIMIZE
# LDFLAGS_CONSOLE
@@ -563,13 +564,13 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
AC_CACHE_CHECK(for cross-compile version of gcc,
ac_cv_cross,
AC_TRY_COMPILE([
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#ifndef _WIN32
#error cross-compiler
#endif
], [],
ac_cv_cross=no,
ac_cv_cross=yes)
]], [[]])],
[ac_cv_cross=no],
[ac_cv_cross=yes])
)
if test "$ac_cv_cross" = "yes"; then
@@ -630,13 +631,13 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
extra_ldflags="-pipe -static-libgcc"
AC_CACHE_CHECK(for mingw32 version of gcc,
ac_cv_win32,
AC_TRY_COMPILE([
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#ifdef _WIN32
#error win32
#endif
], [],
ac_cv_win32=no,
ac_cv_win32=yes)
]], [[]])],
[ac_cv_win32=no],
[ac_cv_win32=yes])
)
if test "$ac_cv_win32" != "yes"; then
AC_MSG_ERROR([${CC} cannot produce win32 executables.])
@@ -645,13 +646,12 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -mwindows -municode -Dmain=xxmain"
AC_CACHE_CHECK(for working -municode linker flag,
ac_cv_municode,
AC_TRY_LINK([
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <windows.h>
int APIENTRY wWinMain(HINSTANCE a, HINSTANCE b, LPWSTR c, int d) {return 0;}
],
[],
ac_cv_municode=yes,
ac_cv_municode=no)
]], [[]])],
[ac_cv_municode=yes],
[ac_cv_municode=no])
)
CFLAGS=$hold_cflags
if test "$ac_cv_municode" = "yes" ; then
@@ -659,6 +659,18 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
else
extra_cflags="$extra_cflags -DTCL_BROKEN_MAINARGS"
fi
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
fi
AC_MSG_CHECKING([compiler flags])
@@ -763,13 +775,13 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
AC_MSG_RESULT([ Using 64-bit $MACHINE mode])
;;
*)
AC_TRY_COMPILE([
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#ifndef _WIN64
#error 32-bit
#endif
], [],
tcl_win_64bit=yes,
tcl_win_64bit=no
]], [[]])],
[tcl_win_64bit=yes],
[tcl_win_64bit=no]
)
if test "$tcl_win_64bit" = "yes" ; then
do64bit=amd64
@@ -988,7 +1000,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
if test "${GCC}" = "yes" ; then
AC_CACHE_CHECK(for SEH support in compiler,
tcl_cv_seh,
AC_TRY_RUN([
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
@@ -1003,10 +1015,10 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
}
return 1;
}
],
tcl_cv_seh=yes,
tcl_cv_seh=no,
tcl_cv_seh=no)
]])],
[tcl_cv_seh=yes],
[tcl_cv_seh=no],
[tcl_cv_seh=no])
)
if test "$tcl_cv_seh" = "no" ; then
AC_DEFINE(HAVE_NO_SEH, 1,
@@ -1021,15 +1033,15 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
#
AC_CACHE_CHECK(for EXCEPTION_DISPOSITION support in include files,
tcl_cv_eh_disposition,
AC_TRY_COMPILE([
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# undef WIN32_LEAN_AND_MEAN
],[
]], [[
EXCEPTION_DISPOSITION x;
],
tcl_cv_eh_disposition=yes,
tcl_cv_eh_disposition=no)
]])],
[tcl_cv_eh_disposition=yes],
[tcl_cv_eh_disposition=no])
)
if test "$tcl_cv_eh_disposition" = "no" ; then
AC_DEFINE(EXCEPTION_DISPOSITION, int,
@@ -1042,18 +1054,18 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
AC_CACHE_CHECK(for winnt.h that ignores VOID define,
tcl_cv_winnt_ignore_void,
AC_TRY_COMPILE([
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#define VOID void
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
], [
]], [[
CHAR c;
SHORT s;
LONG l;
],
tcl_cv_winnt_ignore_void=yes,
tcl_cv_winnt_ignore_void=no)
]])],
[tcl_cv_winnt_ignore_void=yes],
[tcl_cv_winnt_ignore_void=no])
)
if test "$tcl_cv_winnt_ignore_void" = "yes" ; then
AC_DEFINE(HAVE_WINNT_IGNORE_VOID, 1,
@@ -1066,13 +1078,12 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
AC_CACHE_CHECK(for cast to union support,
tcl_cv_cast_to_union,
AC_TRY_COMPILE([],
[
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)
]])],
[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,
@@ -1085,6 +1096,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
AC_SUBST(CFLAGS_DEBUG)
AC_SUBST(CFLAGS_OPTIMIZE)
AC_SUBST(CFLAGS_WARNING)
AC_SUBST(CFLAGS_NOLTO)
])
#------------------------------------------------------------------------
@@ -1243,7 +1255,7 @@ AC_DEFUN([SC_TCL_CFG_ENCODING], [
AC_DEFUN([SC_EMBED_MANIFEST], [
AC_MSG_CHECKING(whether to embed manifest)
AC_ARG_ENABLE(embedded-manifest,
AC_HELP_STRING([--enable-embedded-manifest],
AS_HELP_STRING([--enable-embedded-manifest],
[embed manifest if possible (default: yes)]),
[embed_ok=$enableval], [embed_ok=yes])