summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
Diffstat (limited to 'library')
-rw-r--r--library/init.tcl14
1 files changed, 12 insertions, 2 deletions
diff --git a/library/init.tcl b/library/init.tcl
index acd403d..c52c98d 100644
--- a/library/init.tcl
+++ b/library/init.tcl
@@ -3,7 +3,7 @@
# Default system startup file for Tcl-based applications. Defines
# "unknown" procedure and auto-load facilities.
#
-# RCS: @(#) $Id: init.tcl,v 1.29 1999/04/16 00:46:56 stanton Exp $
+# RCS: @(#) $Id: init.tcl,v 1.30 1999/05/22 01:20:13 stanton Exp $
#
# Copyright (c) 1991-1993 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
@@ -30,9 +30,12 @@ package require -exact Tcl 8.1
# The parent directory of tcl_library. Adding the parent
# means that packages in peer directories will be found automatically.
#
+# Also add the directory where the executable is located, plus ../lib
+# relative to that path.
+#
# tcl_pkgPath, which is set by the platform-specific initialization routines
# On UNIX it is compiled in
-# On Windows it comes from the registry
+# On Windows, it is not used
# On Macintosh it is "Tool Command Language" in the Extensions folder
if {![info exists auto_path]} {
@@ -49,6 +52,13 @@ if {[string compare [info library] {}]} {
}
}
}
+foreach __dir [list [file dirname [info nameofexecutable]] \
+ [file join [file dirname [file dirname \
+ [info nameofexecutable]]] lib]] {
+ if {[lsearch -exact $auto_path $__dir] < 0} {
+ lappend auto_path $__dir
+ }
+}
if {[info exist tcl_pkgPath]} {
foreach __dir $tcl_pkgPath {
if {[lsearch -exact $auto_path $__dir] < 0} {