diff -up tcl8.5.7/library/auto.tcl.old tcl8.5.7/library/auto.tcl --- tcl8.5.7/library/auto.tcl.old 2006-11-03 01:34:52.000000000 +0100 +++ tcl8.5.7/library/auto.tcl 2009-05-18 10:28:16.337102378 +0200 @@ -85,6 +85,13 @@ proc tcl_findLibrary {basename version p lappend dirs $value } + # 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. diff -up tcl8.5.7/library/init.tcl.old tcl8.5.7/library/init.tcl --- tcl8.5.7/library/init.tcl.old 2009-04-10 18:54:51.000000000 +0200 +++ tcl8.5.7/library/init.tcl 2009-05-18 10:25:25.904853164 +0200 @@ -48,16 +48,11 @@ if {![info exists auto_path]} { } namespace eval tcl { 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 - } catch { foreach Dir $::tcl_pkgPath { if {$Dir ni $::auto_path} { diff -up tcl8.5.7/unix/configure.in.old tcl8.5.7/unix/configure.in --- tcl8.5.7/unix/configure.in.old 2009-04-15 21:30:05.000000000 +0200 +++ tcl8.5.7/unix/configure.in 2009-05-18 10:21:30.987855050 +0200 @@ -833,9 +833,9 @@ if test "$FRAMEWORK_BUILD" = "1" ; then test -z "$TCL_MODULE_PATH" && \ TCL_MODULE_PATH="~/Library/Tcl /Library/Tcl /System/Library/Tcl" elif test "$prefix/lib" != "$libdir"; then - TCL_PACKAGE_PATH="${libdir} ${prefix}/lib ${TCL_PACKAGE_PATH}" + TCL_PACKAGE_PATH="${libdir}/tcl8.5 ${prefix}/share/tcl8.5 ${libdir}/tk8.5 ${prefix}/share/tk8.5 ${TCL_PACKAGE_PATH}" else - TCL_PACKAGE_PATH="${prefix}/lib ${TCL_PACKAGE_PATH}" + TCL_PACKAGE_PATH="${libdir}/tcl8.5 ${prefix}/share/tcl8.5 ${libdir}/tk8.5 ${prefix}/share/tk8.5 ${TCL_PACKAGE_PATH}" fi #--------------------------------------------------------------------