Fossil SCM

Improve auto-detection of Tcl on systems where -lpthread is missing from TCL_LIB_SPEC.

mistachkin 2016-01-30 04:29 trunk
Commit 352e2ef9c62efd07a5057a1b37fe9766bf555721
1 file changed +17
+17
--- auto.def
+++ auto.def
@@ -372,10 +372,27 @@
372372
# On some systems, using "-lieee" from TCL_LIB_SPEC appears
373373
# to cause issues.
374374
msg-result "Removing \"-lieee\" and retrying for Tcl..."
375375
set libs [string map [list -lieee ""] $libs]
376376
cc-with [list -cflags $cflags -libs $libs] {
377
+ if {$tclstubs} {
378
+ if {[cc-check-functions Tcl_InitStubs]} {
379
+ set foundtcl 1
380
+ }
381
+ } else {
382
+ if {[cc-check-functions Tcl_CreateInterp]} {
383
+ set foundtcl 1
384
+ }
385
+ }
386
+ }
387
+ }
388
+ if {!$foundtcl && ![string match *-lpthread* $libs]} {
389
+ # On some systems, TCL_LIB_SPEC appears to be missing
390
+ # "-lpthread". Try adding it.
391
+ msg-result "Adding \"-lpthread\" and retrying for Tcl..."
392
+ set libs "$libs -lpthread"
393
+ cc-with [list -cflags $cflags -libs $libs] {
377394
if {$tclstubs} {
378395
if {[cc-check-functions Tcl_InitStubs]} {
379396
set foundtcl 1
380397
}
381398
} else {
382399
--- auto.def
+++ auto.def
@@ -372,10 +372,27 @@
372 # On some systems, using "-lieee" from TCL_LIB_SPEC appears
373 # to cause issues.
374 msg-result "Removing \"-lieee\" and retrying for Tcl..."
375 set libs [string map [list -lieee ""] $libs]
376 cc-with [list -cflags $cflags -libs $libs] {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
377 if {$tclstubs} {
378 if {[cc-check-functions Tcl_InitStubs]} {
379 set foundtcl 1
380 }
381 } else {
382
--- auto.def
+++ auto.def
@@ -372,10 +372,27 @@
372 # On some systems, using "-lieee" from TCL_LIB_SPEC appears
373 # to cause issues.
374 msg-result "Removing \"-lieee\" and retrying for Tcl..."
375 set libs [string map [list -lieee ""] $libs]
376 cc-with [list -cflags $cflags -libs $libs] {
377 if {$tclstubs} {
378 if {[cc-check-functions Tcl_InitStubs]} {
379 set foundtcl 1
380 }
381 } else {
382 if {[cc-check-functions Tcl_CreateInterp]} {
383 set foundtcl 1
384 }
385 }
386 }
387 }
388 if {!$foundtcl && ![string match *-lpthread* $libs]} {
389 # On some systems, TCL_LIB_SPEC appears to be missing
390 # "-lpthread". Try adding it.
391 msg-result "Adding \"-lpthread\" and retrying for Tcl..."
392 set libs "$libs -lpthread"
393 cc-with [list -cflags $cflags -libs $libs] {
394 if {$tclstubs} {
395 if {[cc-check-functions Tcl_InitStubs]} {
396 set foundtcl 1
397 }
398 } else {
399

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button