Fossil SCM

Patch the auto.def file so that the TCL library is found even if it is named tcl8.6 or tcl8.5 instead of just tcl.

drh 2011-11-04 19:39 UTC tcl-integration
Commit dd275844a5879a3eaa319ab890f3470d5a42489e
1 file changed +10 -6
+10 -6
--- auto.def
+++ auto.def
@@ -85,19 +85,23 @@
8585
set tclpath [opt-val with-tcl]
8686
if {$tclpath ne ""} {
8787
if {$tclpath ne "1"} {
8888
cc-with [list -cflags [list -I$tclpath/include -L$tclpath/lib]]
8989
}
90
- if {![cc-check-includes tcl.h] || ![cc-check-function-in-lib Tcl_CreateInterp tcl]} {
91
- if {$tclpath eq ""} {
92
- user-error "No system Tcl available. Try --with-tcl=<path>"
93
- } else {
94
- user-error "No Tcl available at $tclpath"
90
+ if {![cc-check-includes tcl.h]} {
91
+ user-error "Cannot find tcl.h"
92
+ }
93
+ foreach tlib {tcl8.6 tcl8.5 tcl notfound} {
94
+ if {$tlib=="notfound"} {
95
+ user-error "Cannot find a usable libtcl"
96
+ }
97
+ if {[cc-check-function-in-lib Tcl_CreateInterp $tlib]} {
98
+ define-append LIBS -l$tlib
99
+ break
95100
}
96101
}
97102
define FOSSIL_ENABLE_TCL
98
- define-append LIBS -ltcl
99103
if {$tclpath ne "1"} {
100104
define-append EXTRA_CFLAGS -I$tclpath/include
101105
define-append EXTRA_LDFLAGS -L$tclpath/lib
102106
}
103107
}
104108
--- auto.def
+++ auto.def
@@ -85,19 +85,23 @@
85 set tclpath [opt-val with-tcl]
86 if {$tclpath ne ""} {
87 if {$tclpath ne "1"} {
88 cc-with [list -cflags [list -I$tclpath/include -L$tclpath/lib]]
89 }
90 if {![cc-check-includes tcl.h] || ![cc-check-function-in-lib Tcl_CreateInterp tcl]} {
91 if {$tclpath eq ""} {
92 user-error "No system Tcl available. Try --with-tcl=<path>"
93 } else {
94 user-error "No Tcl available at $tclpath"
 
 
 
 
 
95 }
96 }
97 define FOSSIL_ENABLE_TCL
98 define-append LIBS -ltcl
99 if {$tclpath ne "1"} {
100 define-append EXTRA_CFLAGS -I$tclpath/include
101 define-append EXTRA_LDFLAGS -L$tclpath/lib
102 }
103 }
104
--- auto.def
+++ auto.def
@@ -85,19 +85,23 @@
85 set tclpath [opt-val with-tcl]
86 if {$tclpath ne ""} {
87 if {$tclpath ne "1"} {
88 cc-with [list -cflags [list -I$tclpath/include -L$tclpath/lib]]
89 }
90 if {![cc-check-includes tcl.h]} {
91 user-error "Cannot find tcl.h"
92 }
93 foreach tlib {tcl8.6 tcl8.5 tcl notfound} {
94 if {$tlib=="notfound"} {
95 user-error "Cannot find a usable libtcl"
96 }
97 if {[cc-check-function-in-lib Tcl_CreateInterp $tlib]} {
98 define-append LIBS -l$tlib
99 break
100 }
101 }
102 define FOSSIL_ENABLE_TCL
 
103 if {$tclpath ne "1"} {
104 define-append EXTRA_CFLAGS -I$tclpath/include
105 define-append EXTRA_LDFLAGS -L$tclpath/lib
106 }
107 }
108

Keyboard Shortcuts

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