Author: Sergei Golovan
Description: Patch restores version for the name of libtclstub.a library for now,
 until a better solution is found for keeping both tcl8.7-dev and tcl9.0-dev
 installable simultaneously.
Last-Modified: Mon, 27 Nov 2023 12:05:21 +0300

--- a/unix/configure.ac
+++ b/unix/configure.ac
@@ -909,11 +909,15 @@
 # Replace ${VERSION} with contents of ${TCL_VERSION}
 # double-eval to account for TCL_TRIM_DOTS.
 #
-eval "TCL_STUB_LIB_FILE=libtclstub.a"
+eval "TCL_STUB_LIB_FILE=libtclstub${TCL_UNSHARED_LIB_SUFFIX}"
 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
 eval "TCL_STUB_LIB_DIR=\"${libdir}\""
 
-TCL_STUB_LIB_FLAG="-ltclstub"
+if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
+    TCL_STUB_LIB_FLAG="-ltclstub${TCL_VERSION}"
+else
+    TCL_STUB_LIB_FLAG="-ltclstub`echo ${TCL_VERSION} | tr -d .`"
+fi
 
 TCL_BUILD_STUB_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
 TCL_STUB_LIB_SPEC="-L${TCL_STUB_LIB_DIR} ${TCL_STUB_LIB_FLAG}"
--- a/unix/configure
+++ b/unix/configure
@@ -11418,11 +11418,15 @@
 # Replace ${VERSION} with contents of ${TCL_VERSION}
 # double-eval to account for TCL_TRIM_DOTS.
 #
-eval "TCL_STUB_LIB_FILE=libtclstub.a"
+eval "TCL_STUB_LIB_FILE=libtclstub${TCL_UNSHARED_LIB_SUFFIX}"
 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
 eval "TCL_STUB_LIB_DIR=\"${libdir}\""
 
-TCL_STUB_LIB_FLAG="-ltclstub"
+if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
+    TCL_STUB_LIB_FLAG="-ltclstub${TCL_VERSION}"
+else
+    TCL_STUB_LIB_FLAG="-ltclstub`echo ${TCL_VERSION} | tr -d .`"
+fi
 
 TCL_BUILD_STUB_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
 TCL_STUB_LIB_SPEC="-L${TCL_STUB_LIB_DIR} ${TCL_STUB_LIB_FLAG}"
