--- unix/configure.orig	2024-02-07 13:50:03.000000000 -0500
+++ unix/configure	2024-08-16 09:27:27.696036000 -0400
@@ -7303,7 +7303,7 @@
 fi
 
 	    ;;
-	Linux*|GNU*|NetBSD-Debian|DragonFly-*|FreeBSD-*)
+	Linux*|GNU*|NetBSD-Debian|DragonFly-*|FreeBSD-*|MidnightBSD-*)
 	    SHLIB_CFLAGS="-fPIC -fno-common"
 	    SHLIB_SUFFIX=".so"
 
@@ -7319,7 +7319,11 @@
 	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
 
 	    case $system in
-	    DragonFly-*|FreeBSD-*)
+	    DragonFly-*|FreeBSD-*|MidnightBSD-*)
+		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,-soname,\$@"
+		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1'
+		TCL_LIB_VERSIONS_OK=nodots
 		if test "${TCL_THREADS}" = "1"; then
 
 		    # The -pthread needs to go in the LDFLAGS, not LIBS
