--- ./library/auto.tcl_orig 2021-05-28 03:22:58 +0000 +++ ./library/auto.tcl 2021-05-28 03:26:23 +0000 @@ -81,6 +81,13 @@ lappend dirs [::${basename}::pkgconfig get scriptdir,runtime] } + # 2a. As a sibling of Tcl's script directory + if {[catch { + ::tcl::pkgconfig get scriptdir,runtime + } value] == 0} { + lappend dirs [file join [file dirname $value] $basename$version] + } + # 3. Relative to auto_path directories. This checks relative to the # Tcl library as well as allowing loading of libraries added to the # auto_path that is not relative to the core library or binary paths. --- ./library/init.tcl_orig 2021-05-28 03:00:38 +0000 +++ ./library/init.tcl 2021-05-28 03:02:21 +0000 @@ -52,16 +52,11 @@ namespace eval tcl { if {![interp issafe]} { variable Dir - foreach Dir [list $::tcl_library [file dirname $::tcl_library]] { + foreach Dir [list $::tcl_library] { if {$Dir ni $::auto_path} { lappend ::auto_path $Dir } } - set Dir [file join [file dirname [file dirname \ - [info nameofexecutable]]] lib] - if {$Dir ni $::auto_path} { - lappend ::auto_path $Dir - } if {[info exists ::tcl_pkgPath]} { catch { foreach Dir $::tcl_pkgPath { if {$Dir ni $::auto_path} { --- ./unix/configure.in_orig 2025-10-08 04:49:28.831104613 -0500 +++ ./unix/configure.in 2025-10-08 04:51:17.281822910 -0500 @@ -867,9 +867,9 @@ test -z "$TCL_MODULE_PATH" && \ TCL_MODULE_PATH="~/Library/Tcl /Library/Tcl" elif test "$prefix/lib" != "$libdir"; then - test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="${libdir}:${prefix}/lib" + test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="{${libdir}/tcl8.6} {${prefix}/share/tcl8.6} {${libdir}/tk8.6} {${prefix}/share/tk8.6} ${TCL_PACKAGE_PATH}" else - test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="${prefix}/lib" + test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="{${libdir}/tcl8.6} {${prefix}/share/tcl8.6} {${libdir}/tk8.6} {${prefix}/share/tk8.6} ${TCL_PACKAGE_PATH}" fi #--------------------------------------------------------------------