summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--library/auto.tcl17
1 files changed, 13 insertions, 4 deletions
diff --git a/library/auto.tcl b/library/auto.tcl
index ea2fe5e..dc37328 100644
--- a/library/auto.tcl
+++ b/library/auto.tcl
@@ -97,13 +97,22 @@ proc tcl_findLibrary {basename version patch initScript enVarName varName} {
}
if {!$found} {
set paths {}
- lappend paths [file join $root app]
- lappend paths [::${basename}::pkgconfig get libdir,runtime]
- lappend paths [::${basename}::pkgconfig get bindir,runtime]
+ if {![catch {::${basename}::pkgconfig get libdir,runtime} dir]} {
+ lappend paths $dir
+ } else {
+ catch {lappend paths [::tcl::pkgconfig get libdir,runtime]}
+ }
+ if {![catch {::${basename}::pkgconfig get bindir,runtime} dir]} {
+ lappend paths $dir
+ } else {
+ catch {lappend paths [::tcl::pkgconfig get bindir,runtime]}
+ }
if {[catch {::${basename}::pkgconfig get dllfile,runtime} dllfile]} {
set dllfile "lib${basename}${version}[info sharedlibextension]"
}
- lappend paths [file dirname [file join [pwd] [info nameofexecutable]]]
+ set dir [file dirname [file join [pwd] [info nameofexecutable]]]
+ lappend paths $dir
+ lappend paths [file join [file dirname $dir] lib]
foreach path $paths {
set archive [file join $path $dllfile]
if {![file exists $archive]} {