From bf868c1c56292a44ff5faeef5b348408554cab1a Mon Sep 17 00:00:00 2001
From: "jan.nijtmans" <nijtmans@users.sourceforge.net>
Date: Mon, 11 Dec 2017 14:19:48 +0000
Subject: Initial implementation of TIP #491. Not tested yet.

---
 generic/tcl.h     |  4 ++++
 generic/tclInt.h  |  4 ++++
 unix/configure.ac |  6 ------
 win/configure.ac  |  6 ------
 win/rules.vc      | 43 ++++---------------------------------------
 win/tcl.rc        |  8 +-------
 win/tclsh.rc      |  8 +-------
 7 files changed, 14 insertions(+), 65 deletions(-)

diff --git a/generic/tcl.h b/generic/tcl.h
index a6a8c94..b7d4e90 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -91,6 +91,10 @@ extern "C" {
 #endif
 #endif /* !TCL_NO_DEPRECATED */
 
+#ifndef TCL_THREADS
+#   define TCL_THREADS 1
+#endif
+
 /*
  * A special definition used to allow this header file to be included from
  * windows resource files so that they can obtain version information.
diff --git a/generic/tclInt.h b/generic/tclInt.h
index ad1d9c6..1fd252f 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -4149,6 +4149,10 @@ typedef const char *TclDTraceStr;
 	} \
     }
 
+#if TCL_THREADS && !defined(USE_THREAD_ALLOC)
+#   define USE_THREAD_ALLOC 1
+#endif
+
 #if defined(PURIFY)
 
 /*
diff --git a/unix/configure.ac b/unix/configure.ac
index e14d85e..5b982e8 100644
--- a/unix/configure.ac
+++ b/unix/configure.ac
@@ -120,12 +120,6 @@ if test -z "$no_pipe" && test -n "$GCC"; then
 fi
 
 #------------------------------------------------------------------------
-# Threads support
-#------------------------------------------------------------------------
-
-SC_ENABLE_THREADS
-
-#------------------------------------------------------------------------
 # Embedded configuration information, encoding to use for the values, TIP #59
 #------------------------------------------------------------------------
 
diff --git a/win/configure.ac b/win/configure.ac
index d03695c..179f151 100644
--- a/win/configure.ac
+++ b/win/configure.ac
@@ -78,12 +78,6 @@ AC_PROG_MAKE_SET
 AC_OBJEXT
 AC_EXEEXT
 
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-#--------------------------------------------------------------------
-
-SC_ENABLE_THREADS
-
 #------------------------------------------------------------------------
 # Embedded configuration information, encoding to use for the values, TIP #59
 #------------------------------------------------------------------------
diff --git a/win/rules.vc b/win/rules.vc
index 9b917b6..890618c 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -626,7 +626,6 @@ LINKERFLAGS     = $(LINKERFLAGS) -ltcg
 # The following macros are defined by this section based on OPTS
 # STATIC_BUILD - 0 -> Tcl is to be built as a shared library
 #                1 -> build as a static library and shell
-# TCL_THREADS - legacy but always 1 on Windows since winsock requires it.
 # DEBUG - 1 -> debug build, 0 -> release builds
 # SYMBOLS - 1 -> generate PDB's, 0 -> no PDB's
 # PROFILE - 1 -> generate profiling info, 0 -> no profiling
@@ -648,7 +647,6 @@ LINKERFLAGS     = $(LINKERFLAGS) -ltcg
 
 # Default values for all the above
 STATIC_BUILD	= 0
-TCL_THREADS	= 1
 DEBUG		= 0
 SYMBOLS		= 0
 PROFILE		= 0
@@ -703,15 +701,6 @@ TCL_USE_STATIC_PACKAGES	= 1
 TCL_USE_STATIC_PACKAGES	= 0
 !endif
 
-!if [nmakehlp -f $(OPTS) "nothreads"]
-!message *** Compile explicitly for non-threaded tcl
-TCL_THREADS	= 0
-USE_THREAD_ALLOC= 0
-!else
-TCL_THREADS	= 1
-USE_THREAD_ALLOC= 1
-!endif
-
 !if [nmakehlp -f $(OPTS) "symbols"]
 !message *** Doing symbols
 DEBUG		= 1
@@ -747,12 +736,6 @@ PGO		= 0
 !message *** Warning: ignoring option "loimpact" - deprecated on modern Windows.
 !endif
 
-# TBD - should get rid of this option
-!if [nmakehlp -f $(OPTS) "thrdalloc"]
-!message *** Doing thrdalloc
-USE_THREAD_ALLOC = 1
-!endif
-
 !if [nmakehlp -f $(OPTS) "tclalloc"]
 USE_THREAD_ALLOC = 0
 !endif
@@ -943,7 +926,6 @@ VERSION         = $(DOTVERSION:.=)
 # different compilers, build configurations etc.,
 #
 # Naming convention (suffixes):
-#   t = full thread support.
 #   s = static library (as opposed to an import library)
 #   g = linked to the debug enabled C run-time.
 #   x = special static build when it links to the dynamic C run-time.
@@ -965,7 +947,7 @@ VERSION         = $(DOTVERSION:.=)
 # PRJSTUBLIB - output path of the generated project stubs library
 # RESFILE - output resource file (only if not static build)
 
-SUFX	    = tsgx
+SUFX	    = sgx
 
 !if $(DEBUG)
 BUILDDIRTOP = Debug
@@ -984,7 +966,7 @@ BUILDDIRTOP =$(BUILDDIRTOP)_VC$(VCVER)
 SUFX	    = $(SUFX:g=)
 !endif
 
-TMP_DIRFULL = .\$(BUILDDIRTOP)\$(PROJECT)_ThreadedDynamicStaticX
+TMP_DIRFULL = .\$(BUILDDIRTOP)\$(PROJECT)_DynamicStaticX
 
 !if !$(STATIC_BUILD)
 TMP_DIRFULL = $(TMP_DIRFULL:Static=)
@@ -1001,11 +983,6 @@ SUFX	    = $(SUFX:x=)
 !endif
 !endif
 
-!if !$(TCL_THREADS)
-TMP_DIRFULL = $(TMP_DIRFULL:Threaded=)
-SUFX	    = $(SUFX:t=)
-!endif
-
 !ifndef TMP_DIR
 TMP_DIR	    = $(TMP_DIRFULL)
 !ifndef OUT_DIR
@@ -1049,9 +1026,6 @@ TCL_INCLUDES    = -I"$(WINDIR)" -I"$(GENERICDIR)"
 !if $(TCLINSTALL) # Building against an installed Tcl
 
 TCLSH		= $(_TCLDIR)\bin\tclsh$(TCL_VERSION)$(SUFX).exe
-!if !exist("$(TCLSH)") && $(TCL_THREADS)
-TCLSH           = $(_TCLDIR)\bin\tclsh$(TCL_VERSION)t$(SUFX).exe
-!endif
 TCLSTUBLIB	= $(_TCLDIR)\lib\tclstub$(TCL_VERSION).lib
 TCLIMPLIB	= $(_TCLDIR)\lib\tcl$(TCL_VERSION)$(SUFX).lib
 TCL_LIBRARY	= $(_TCLDIR)\lib
@@ -1063,9 +1037,6 @@ TCL_INCLUDES    = -I"$(_TCLDIR)\include"
 !else # Building against Tcl sources
 
 TCLSH		= $(_TCLDIR)\win\$(BUILDDIRTOP)\tclsh$(TCL_VERSION)$(SUFX).exe
-!if !exist($(TCLSH)) && $(TCL_THREADS)
-TCLSH		= $(_TCLDIR)\win\$(BUILDDIRTOP)\tclsh$(TCL_VERSION)t$(SUFX).exe
-!endif
 TCLSTUBLIB	= $(_TCLDIR)\win\$(BUILDDIRTOP)\tclstub$(TCL_VERSION).lib
 TCLIMPLIB	= $(_TCLDIR)\win\$(BUILDDIRTOP)\tcl$(TCL_VERSION)$(SUFX).lib
 TCL_LIBRARY	= $(_TCLDIR)\library
@@ -1205,11 +1176,8 @@ OPTDEFINES	= $(OPTDEFINES) -DTCL_MEM_DEBUG
 !if $(TCL_COMPILE_DEBUG)
 OPTDEFINES	= $(OPTDEFINES) -DTCL_COMPILE_DEBUG -DTCL_COMPILE_STATS
 !endif
-!if $(TCL_THREADS)
-OPTDEFINES	= $(OPTDEFINES) -DTCL_THREADS=1
-!if $(USE_THREAD_ALLOC)
-OPTDEFINES	= $(OPTDEFINES) -DUSE_THREAD_ALLOC=1
-!endif
+!if $(USE_THREAD_ALLOC)==0
+OPTDEFINES	= $(OPTDEFINES) -DUSE_THREAD_ALLOC=0
 !endif
 !if $(STATIC_BUILD)
 OPTDEFINES	= $(OPTDEFINES) -DSTATIC_BUILD
@@ -1662,9 +1630,6 @@ TCLNMAKECONFIG = "$(OUT_DIR)\tcl.nmake"
 !if defined(CORE_MACHINE) && "$(CORE_MACHINE)" != "$(MACHINE)"
 !error ERROR: Build target ($(MACHINE)) does not match the Tcl library architecture ($(CORE_MACHINE)).
 !endif
-!if defined(CORE_USE_THREAD_ALLOC) && $(CORE_USE_THREAD_ALLOC) != $(USE_THREAD_ALLOC)
-!message WARNING: Value of USE_THREAD_ALLOC ($(USE_THREAD_ALLOC)) does not match its Tcl core value ($(CORE_USE_THREAD_ALLOC)).
-!endif
 !if defined(CORE_DEBUG) && $(CORE_DEBUG) != $(DEBUG)
 !message WARNING: Value of DEBUG ($(DEBUG)) does not match its Tcl library configuration ($(DEBUG)).
 !endif
diff --git a/win/tcl.rc b/win/tcl.rc
index be5e0a7..477512d 100644
--- a/win/tcl.rc
+++ b/win/tcl.rc
@@ -7,19 +7,13 @@
 //
 // build-up the name suffix that defines the type of build this is.
 //
-#if TCL_THREADS
-#define SUFFIX_THREADS	    "t"
-#else
-#define SUFFIX_THREADS	    ""
-#endif
-
 #if DEBUG && !UNCHECKED
 #define SUFFIX_DEBUG	    "g"
 #else
 #define SUFFIX_DEBUG	    ""
 #endif
 
-#define SUFFIX		    SUFFIX_THREADS SUFFIX_DEBUG
+#define SUFFIX		    SUFFIX_DEBUG
 
 
 LANGUAGE 0x9, 0x1	/* LANG_ENGLISH, SUBLANG_DEFAULT */
diff --git a/win/tclsh.rc b/win/tclsh.rc
index 161da50..bd1a4da 100644
--- a/win/tclsh.rc
+++ b/win/tclsh.rc
@@ -8,12 +8,6 @@
 //
 // build-up the name suffix that defines the type of build this is.
 //
-#if TCL_THREADS
-#define SUFFIX_THREADS	    "t"
-#else
-#define SUFFIX_THREADS	    ""
-#endif
-
 #if STATIC_BUILD
 #define SUFFIX_STATIC	    "s"
 #else
@@ -26,7 +20,7 @@
 #define SUFFIX_DEBUG	    ""
 #endif
 
-#define SUFFIX		    SUFFIX_THREADS SUFFIX_STATIC SUFFIX_DEBUG
+#define SUFFIX		    SUFFIX_STATIC SUFFIX_DEBUG
 
 
 LANGUAGE 0x9, 0x1	/* LANG_ENGLISH, SUBLANG_DEFAULT */
-- 
cgit v0.12


From 5c4f8d88b5491e7656dedeab904b42b437b83e01 Mon Sep 17 00:00:00 2001
From: "jan.nijtmans" <nijtmans@users.sourceforge.net>
Date: Thu, 14 Dec 2017 14:38:30 +0000
Subject: fix comment

---
 win/rules.vc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/win/rules.vc b/win/rules.vc
index f22a2dc..2ee8f0e 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -957,7 +957,7 @@ VERSION         = $(DOTVERSION:.=)
 # different compilers, build configurations etc.,
 #
 # Naming convention (suffixes):
-#   t = full thread support. (Not used for Tcl >= 8.6)
+#   t = full thread support. (Not used for Tcl >= 8.7)
 #   s = static library (as opposed to an import library)
 #   g = linked to the debug enabled C run-time.
 #   x = special static build when it links to the dynamic C run-time.
@@ -1048,7 +1048,7 @@ STUBPREFIX      = $(PROJECT)stub
 # Set up paths to various Tcl executables and libraries needed by extensions
 !if $(DOING_TCL)
 
-TCLSHNAME       = $(PROJECT)sh$(TCL_VERSION)$(SUFX).exe
+TCLSHNAME       = $(PROJECT)sh$(VERSION)$(SUFX).exe
 TCLSH		= $(OUT_DIR)\$(TCLSHNAME)
 TCLIMPLIB	= $(OUT_DIR)\$(PROJECT)$(VERSION)$(SUFX).lib
 TCLLIBNAME	= $(PROJECT)$(VERSION)$(SUFX).$(EXT)
-- 
cgit v0.12


From 04604552b21903025c8b98a936347adae95c6ed3 Mon Sep 17 00:00:00 2001
From: dgp <dgp@users.sourceforge.net>
Date: Mon, 16 Apr 2018 14:51:19 +0000
Subject: ran autoconf on the unix directory. This breaks the build.

---
 unix/configure | 320 ---------------------------------------------------------
 1 file changed, 320 deletions(-)

diff --git a/unix/configure b/unix/configure
index 36bc4b9..a2db021 100755
--- a/unix/configure
+++ b/unix/configure
@@ -699,7 +699,6 @@ ZLIB_INCLUDE
 ZLIB_SRCS
 ZLIB_OBJS
 TCLSH_PROG
-TCL_THREADS
 EGREP
 GREP
 CPP
@@ -755,7 +754,6 @@ enable_option_checking
 enable_man_symlinks
 enable_man_compression
 enable_man_suffix
-enable_threads
 with_encoding
 enable_shared
 enable_64bit
@@ -1395,7 +1393,6 @@ Optional Features:
                           use STRING as a suffix to manpage file names
                           (default: no, tcl if enabled without
                           specifying STRING)
-  --enable-threads        build with threads (default: on)
   --enable-shared         build and link with shared libraries (default: on)
   --enable-64bit          enable 64bit support (default: off)
   --enable-64bit-vis      enable 64bit Sparc VIS support (default: off)
@@ -3911,323 +3908,6 @@ $as_echo "$tcl_cv_cc_pipe" >&6; }
 fi
 
 #------------------------------------------------------------------------
-# Threads support
-#------------------------------------------------------------------------
-
-
-    # Check whether --enable-threads was given.
-if test "${enable_threads+set}" = set; then :
-  enableval=$enable_threads; tcl_ok=$enableval
-else
-  tcl_ok=yes
-fi
-
-
-    if test "${TCL_THREADS}" = 1; then
-	tcl_threaded_core=1;
-    fi
-
-    if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
-	TCL_THREADS=1
-	# USE_THREAD_ALLOC tells us to try the special thread-based
-	# allocator that significantly reduces lock contention
-
-$as_echo "#define USE_THREAD_ALLOC 1" >>confdefs.h
-
-
-$as_echo "#define _REENTRANT 1" >>confdefs.h
-
-	if test "`uname -s`" = "SunOS" ; then
-
-$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
-
-	fi
-
-$as_echo "#define _THREAD_SAFE 1" >>confdefs.h
-
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5
-$as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; }
-if ${ac_cv_lib_pthread_pthread_mutex_init+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* 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 pthread_mutex_init ();
-int
-main ()
-{
-return pthread_mutex_init ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_pthread_pthread_mutex_init=yes
-else
-  ac_cv_lib_pthread_pthread_mutex_init=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
-$as_echo "$ac_cv_lib_pthread_pthread_mutex_init" >&6; }
-if test "x$ac_cv_lib_pthread_pthread_mutex_init" = xyes; then :
-  tcl_ok=yes
-else
-  tcl_ok=no
-fi
-
-	if test "$tcl_ok" = "no"; then
-	    # Check a little harder for __pthread_mutex_init in the same
-	    # library, as some systems hide it there until pthread.h is
-	    # defined.  We could alternatively do an AC_TRY_COMPILE with
-	    # pthread.h, but that will work with libpthread really doesn't
-	    # exist, like AIX 4.2.  [Bug: 4359]
-	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_mutex_init in -lpthread" >&5
-$as_echo_n "checking for __pthread_mutex_init in -lpthread... " >&6; }
-if ${ac_cv_lib_pthread___pthread_mutex_init+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* 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 __pthread_mutex_init ();
-int
-main ()
-{
-return __pthread_mutex_init ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_pthread___pthread_mutex_init=yes
-else
-  ac_cv_lib_pthread___pthread_mutex_init=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5
-$as_echo "$ac_cv_lib_pthread___pthread_mutex_init" >&6; }
-if test "x$ac_cv_lib_pthread___pthread_mutex_init" = xyes; then :
-  tcl_ok=yes
-else
-  tcl_ok=no
-fi
-
-	fi
-
-	if test "$tcl_ok" = "yes"; then
-	    # The space is needed
-	    THREADS_LIBS=" -lpthread"
-	else
-	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthreads" >&5
-$as_echo_n "checking for pthread_mutex_init in -lpthreads... " >&6; }
-if ${ac_cv_lib_pthreads_pthread_mutex_init+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthreads  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* 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 pthread_mutex_init ();
-int
-main ()
-{
-return pthread_mutex_init ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_pthreads_pthread_mutex_init=yes
-else
-  ac_cv_lib_pthreads_pthread_mutex_init=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5
-$as_echo "$ac_cv_lib_pthreads_pthread_mutex_init" >&6; }
-if test "x$ac_cv_lib_pthreads_pthread_mutex_init" = xyes; then :
-  tcl_ok=yes
-else
-  tcl_ok=no
-fi
-
-	    if test "$tcl_ok" = "yes"; then
-		# The space is needed
-		THREADS_LIBS=" -lpthreads"
-	    else
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc" >&5
-$as_echo_n "checking for pthread_mutex_init in -lc... " >&6; }
-if ${ac_cv_lib_c_pthread_mutex_init+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lc  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* 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 pthread_mutex_init ();
-int
-main ()
-{
-return pthread_mutex_init ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_c_pthread_mutex_init=yes
-else
-  ac_cv_lib_c_pthread_mutex_init=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_pthread_mutex_init" >&5
-$as_echo "$ac_cv_lib_c_pthread_mutex_init" >&6; }
-if test "x$ac_cv_lib_c_pthread_mutex_init" = xyes; then :
-  tcl_ok=yes
-else
-  tcl_ok=no
-fi
-
-		if test "$tcl_ok" = "no"; then
-		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc_r" >&5
-$as_echo_n "checking for pthread_mutex_init in -lc_r... " >&6; }
-if ${ac_cv_lib_c_r_pthread_mutex_init+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lc_r  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* 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 pthread_mutex_init ();
-int
-main ()
-{
-return pthread_mutex_init ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_c_r_pthread_mutex_init=yes
-else
-  ac_cv_lib_c_r_pthread_mutex_init=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5
-$as_echo "$ac_cv_lib_c_r_pthread_mutex_init" >&6; }
-if test "x$ac_cv_lib_c_r_pthread_mutex_init" = xyes; then :
-  tcl_ok=yes
-else
-  tcl_ok=no
-fi
-
-		    if test "$tcl_ok" = "yes"; then
-			# The space is needed
-			THREADS_LIBS=" -pthread"
-		    else
-			TCL_THREADS=0
-			{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Don't know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile..." >&5
-$as_echo "$as_me: WARNING: Don't know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile..." >&2;}
-		    fi
-		fi
-	    fi
-	fi
-
-	# Does the pthread-implementation provide
-	# 'pthread_attr_setstacksize' ?
-
-	ac_saved_libs=$LIBS
-	LIBS="$LIBS $THREADS_LIBS"
-	for ac_func in pthread_attr_setstacksize pthread_atfork
-do :
-  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-	LIBS=$ac_saved_libs
-    else
-	TCL_THREADS=0
-    fi
-    # Do checking message here to not mess up interleaved configure output
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for building with threads" >&5
-$as_echo_n "checking for building with threads... " >&6; }
-    if test "${TCL_THREADS}" = 1; then
-
-$as_echo "#define TCL_THREADS 1" >>confdefs.h
-
-	if test "${tcl_threaded_core}" = 1; then
-	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (threaded core)" >&5
-$as_echo "yes (threaded core)" >&6; }
-	else
-	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	fi
-    else
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    fi
-
-
-
-
-#------------------------------------------------------------------------
 # Embedded configuration information, encoding to use for the values, TIP #59
 #------------------------------------------------------------------------
 
-- 
cgit v0.12