--- tcl8.6.13/win/configure.in.orig	2024-01-17 07:56:10.115961500 +0100
+++ tcl8.6.13/win/configure.in	2024-01-17 07:57:05.029983300 +0100
@@ -142,27 +142,8 @@
   tcl_ok=yes
 ])
 zlib_lib_name=zdll.lib
 AS_IF([test "$tcl_ok" = "yes"], [
-  AC_SUBST(ZLIB_DLL_FILE,[\${ZLIB_DLL_FILE}])
-  AS_IF([test "$do64bit" != "no"], [
-    AS_IF([test "$do64bit" = "arm64"], [
-      AS_IF([test "$GCC" = "yes"],[
-	AC_SUBST(ZLIB_LIBS,[\${ZLIB_DIR_NATIVE}/win64-arm/libz.dll.a])
-	zlib_lib_name=libz.dll.a
-      ], [
-	AC_SUBST(ZLIB_LIBS,[\${ZLIB_DIR_NATIVE}/win64-arm/zdll.lib])
-      ])
-    ], [
-      AS_IF([test "$GCC" = "yes"],[
-	AC_SUBST(ZLIB_LIBS,[\${ZLIB_DIR_NATIVE}/win64/libz.dll.a])
-	zlib_lib_name=libz.dll.a
-      ], [
-	AC_SUBST(ZLIB_LIBS,[\${ZLIB_DIR_NATIVE}/win64/zdll.lib])
-      ])
-    ])
-  ], [
-    AC_SUBST(ZLIB_LIBS,[\${ZLIB_DIR_NATIVE}/win32/zdll.lib])
-  ])
+  AC_SUBST(ZLIB_LIBS,[-lz])
 ], [
   AC_SUBST(ZLIB_OBJS,[\${ZLIB_OBJS}])
 ])
--- tcl8.6.13/win/Makefile.in.orig	2022-10-28 17:19:48.000000000 +0200
+++ tcl8.6.13/win/Makefile.in	2024-01-17 07:54:22.958221600 +0100
@@ -159,9 +159,8 @@
 			  package ifneeded registry 1.3.5 [list load ${REG_DLL_FILE} Registry]
 TEST_LOAD_FACILITIES	= package ifneeded Tcltest ${VERSION}@TCL_PATCH_LEVEL@ [list load ${TEST_DLL_FILE}];\
 			  $(TEST_LOAD_PRMS)
-ZLIB_DLL_FILE		= zlib1.dll
 
-SHARED_LIBRARIES	= $(TCL_DLL_FILE) @ZLIB_DLL_FILE@
+SHARED_LIBRARIES 	= $(TCL_DLL_FILE)
 STATIC_LIBRARIES	= $(TCL_LIB_FILE)
 
 TCLSH			= tclsh$(VER)${EXESUFFIX}
@@ -202,7 +201,7 @@
 SHLIB_LD_LIBS	= @SHLIB_LD_LIBS@
 SHLIB_CFLAGS	= @SHLIB_CFLAGS@
 SHLIB_SUFFIX	= @SHLIB_SUFFIX@
-LIBS		= @LIBS@ $(shell $(CYGPATH) '@ZLIB_LIBS@')
+LIBS		= @LIBS@ @ZLIB_LIBS@
 
 RMDIR		= rm -rf
 MKDIR		= mkdir -p
@@ -527,18 +526,6 @@
		tclsh.$(RES) $(CC_EXENAME) $(LDFLAGS_CONSOLE)
	$(COPY) tclsh.exe.manifest ${TEST_EXE_FILE}.manifest

-# use prebuilt zlib1.dll
-${ZLIB_DLL_FILE}: ${TCL_STUB_LIB_FILE}
-	@if test "@ZLIB_LIBS@set" = "${ZLIB_DIR_NATIVE}/win64-arm/zdll.libset" ; then \
-		$(COPY) $(ZLIB_DIR)/win64-arm/${ZLIB_DLL_FILE} ${ZLIB_DLL_FILE}; \
-	elif test "@ZLIB_LIBS@set" = "${ZLIB_DIR_NATIVE}/win64-arm/libz.dll.aset" ; then \
-		$(COPY) $(ZLIB_DIR)/win64-arm/${ZLIB_DLL_FILE} ${ZLIB_DLL_FILE}; \
-	elif test "@ZLIB_LIBS@set" = "${ZLIB_DIR_NATIVE}/win32/zdll.libset" ; then \
-		$(COPY) $(ZLIB_DIR)/win32/${ZLIB_DLL_FILE} ${ZLIB_DLL_FILE}; \
-	else \
-		$(COPY) $(ZLIB_DIR)/win64/${ZLIB_DLL_FILE} ${ZLIB_DLL_FILE}; \
-	fi;
-
 # Add the object extension to the implicit rules. By default .obj is not
 # automatically added.
 
@@ -667,7 +654,7 @@
 		else true; \
 		fi; \
 	    done;
-	@for i in $(TCL_DLL_FILE) $(ZLIB_DLL_FILE) $(TCLSH); \
+	@for i in $(TCL_DLL_FILE) $(TCLSH); \
 	    do \
 	    if [ -f $$i ]; then \
 		echo "Installing $$i to $(BIN_INSTALL_DIR)/"; \
