summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-02-09 13:34:26 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-02-09 13:34:26 (GMT)
commit0043160893f36a39afbe5a4f9dff3fac577d0dec (patch)
tree149acdf06d9c1b2b5aa25d28fd85c6e1682566ea /library
parentaf4a77f3e35d39964eeae9c3636a42d6d29f4d5d (diff)
downloadtcl-0043160893f36a39afbe5a4f9dff3fac577d0dec.zip
tcl-0043160893f36a39afbe5a4f9dff3fac577d0dec.tar.gz
tcl-0043160893f36a39afbe5a4f9dff3fac577d0dec.tar.bz2
Handle the situation that ::${basename}::pkgconfig does not have bindir/libdir,runtime keys: Either get those from Tcl, or from [info nameofexecutable]
Diffstat (limited to 'library')
-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]} {