<commit_before>diff -up tcl8.5.9/unix/tcl.m4.orig tcl8.5.9/unix/tcl.m4
--- tcl8.5.9/unix/tcl.m4.orig	2011-04-14 15:28:58.862191616 -0600
+++ tcl8.5.9/unix/tcl.m4	2011-04-14 15:18:45.910163968 -0600
@@ -669,9 +669,16 @@ AC_DEFUN([SC_ENABLE_THREADS], [
 			# The space is needed
 			THREADS_LIBS=" -pthread"
 		    else
+		    AC_CHECK_LIB(root, pthread_mutex_init,
+		    tcl_ok=yes, tcl_ok=no)
+		    if test "$tcl_ok" = "yes"; then
+		    # The space is needed
+		    THREAD_LIBS=" "
+		    else
 			TCL_THREADS=0
 			AC_MSG_WARN([Don't know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile...])
 		    fi
+		    fi
 		fi
 	    fi
 	fi
@@ -1276,6 +1283,7 @@ dnl AC_CHECK_TOOL(AR, ar)
 	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
 	    DL_OBJS="tclLoadDl.o"
 	    DL_LIBS="-lroot"
+	    LD_LIBRARY_PATH_VAR="LIBRARY_PATH"
 	    AC_CHECK_LIB(network, inet_ntoa, [LIBS="$LIBS -lnetwork"])<commit_msg>Minor fix for tcl to at least allow most of the tests to be run.<commit_after>diff -up tcl8.5.9/tests/env.test.orig tcl8.5.9/tests/env.test
--- tcl8.5.9/tests/env.test.orig	2011-05-14 16:24:47.871366656 -0600
+++ tcl8.5.9/tests/env.test	2011-05-14 16:26:18.149946368 -0600
@@ -80,7 +80,7 @@ set printenvScript [makeFile {
 	TCL_LIBRARY PATH LD_LIBRARY_PATH LIBPATH PURE_PROG_NAME DISPLAY
 	SHLIB_PATH SYSTEMDRIVE SYSTEMROOT DYLD_LIBRARY_PATH DYLD_FRAMEWORK_PATH
 	DYLD_NEW_LOCAL_SHARED_REGIONS DYLD_NO_FIX_PREBINDING
-	__CF_USER_TEXT_ENCODING SECURITYSESSIONID LANG WINDIR TERM
+	__CF_USER_TEXT_ENCODING SECURITYSESSIONID LANG WINDIR TERM LIBRARY_PATH
     } {
 	lrem names $name
     }
@@ -112,7 +112,7 @@ foreach name [array names env] {
 	    TCL_LIBRARY PATH LD_LIBRARY_PATH LIBPATH DISPLAY SHLIB_PATH
 	    SYSTEMDRIVE SYSTEMROOT DYLD_LIBRARY_PATH DYLD_FRAMEWORK_PATH
 	    DYLD_NEW_LOCAL_SHARED_REGIONS DYLD_NO_FIX_PREBINDING
-	    SECURITYSESSIONID LANG WINDIR TERM
+	    SECURITYSESSIONID LANG WINDIR TERM LIBRARY_PATH
     }} {
 	unset env($name)
     }
diff -up tcl8.5.9/unix/tcl.m4.orig tcl8.5.9/unix/tcl.m4
--- tcl8.5.9/unix/tcl.m4.orig	2010-09-08 11:40:48.016515072 -0600
+++ tcl8.5.9/unix/tcl.m4	2011-05-14 16:20:36.560201728 -0600
@@ -669,9 +669,16 @@ AC_DEFUN([SC_ENABLE_THREADS], [
 			# The space is needed
 			THREADS_LIBS=" -pthread"
 		    else
+		    AC_CHECK_LIB(root, pthread_mutex_init,
+		    tcl_ok=yes, tcl_ok=no)
+		    if test "$tcl_ok" = "yes"; then
+		    # The space is needed
+		    THREAD_LIBS=" "
+		    else
 			TCL_THREADS=0
 			AC_MSG_WARN([Don't know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile...])
 		    fi
+		    fi
 		fi
 	    fi
 	fi
@@ -1276,6 +1283,7 @@ dnl AC_CHECK_TOOL(AR, ar)
 	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
 	    DL_OBJS="tclLoadDl.o"
 	    DL_LIBS="-lroot"
+	    LD_LIBRARY_PATH_VAR="LIBRARY_PATH"
 	    AC_CHECK_LIB(network, inet_ntoa, [LIBS="$LIBS -lnetwork"])
{'fraction_non_alphanumeric': 0.12364864864864865, 'fraction_numerical': 0.08783783783783784, 'mean_word_length': 3.23, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '111831', 'n_tokens_mistral': 1525, 'n_tokens_neox': 1309, 'n_words': 249}