Fossil SCM

Simplify and enhance changes from the previous check-in.

mistachkin 2015-11-03 03:47 trunk
Commit 653b6b92404c53f31aa30653e9b03e4ac0087066
1 file changed +11 -11
+11 -11
--- auto.def
+++ auto.def
@@ -164,40 +164,40 @@
164164
} else {
165165
set libs "$tclconfig(TCL_LIB_SPEC) $tclconfig(TCL_LIBS)"
166166
}
167167
set cflags $tclconfig(TCL_INCLUDE_SPEC)
168168
if {!$tclprivatestubs} {
169
- set libtclfailcount 0
169
+ set foundtcl 0; # Did we find a working Tcl library?
170170
cc-with [list -cflags $cflags -libs $libs] {
171171
if {$tclstubs} {
172
- if {![cc-check-functions Tcl_InitStubs]} {
173
- incr libtclfailcount
172
+ if {[cc-check-functions Tcl_InitStubs]} {
173
+ set foundtcl 1
174174
}
175175
} else {
176
- if {![cc-check-functions Tcl_CreateInterp]} {
177
- incr libtclfailcount
176
+ if {[cc-check-functions Tcl_CreateInterp]} {
177
+ set foundtcl 1
178178
}
179179
}
180180
}
181
- if {$libtclfailcount >= 1} {
181
+ if {!$foundtcl && [string match *-lieee* $libs]} {
182182
# On some systems, using "-lieee" from TCL_LIB_SPEC appears
183183
# to cause issues.
184184
msg-result "Removing \"-lieee\" and retrying for Tcl..."
185185
set libs [string map [list -lieee ""] $libs]
186186
cc-with [list -cflags $cflags -libs $libs] {
187187
if {$tclstubs} {
188
- if {![cc-check-functions Tcl_InitStubs]} {
189
- incr libtclfailcount
188
+ if {[cc-check-functions Tcl_InitStubs]} {
189
+ set foundtcl 1
190190
}
191191
} else {
192
- if {![cc-check-functions Tcl_CreateInterp]} {
193
- incr libtclfailcount
192
+ if {[cc-check-functions Tcl_CreateInterp]} {
193
+ set foundtcl 1
194194
}
195195
}
196196
}
197197
}
198
- if {$libtclfailcount >= 2} {
198
+ if {!$foundtcl} {
199199
if {$tclstubs} {
200200
user-error "Cannot find a usable Tcl stubs library $msg"
201201
} else {
202202
user-error "Cannot find a usable Tcl library $msg"
203203
}
204204
--- auto.def
+++ auto.def
@@ -164,40 +164,40 @@
164 } else {
165 set libs "$tclconfig(TCL_LIB_SPEC) $tclconfig(TCL_LIBS)"
166 }
167 set cflags $tclconfig(TCL_INCLUDE_SPEC)
168 if {!$tclprivatestubs} {
169 set libtclfailcount 0
170 cc-with [list -cflags $cflags -libs $libs] {
171 if {$tclstubs} {
172 if {![cc-check-functions Tcl_InitStubs]} {
173 incr libtclfailcount
174 }
175 } else {
176 if {![cc-check-functions Tcl_CreateInterp]} {
177 incr libtclfailcount
178 }
179 }
180 }
181 if {$libtclfailcount >= 1} {
182 # On some systems, using "-lieee" from TCL_LIB_SPEC appears
183 # to cause issues.
184 msg-result "Removing \"-lieee\" and retrying for Tcl..."
185 set libs [string map [list -lieee ""] $libs]
186 cc-with [list -cflags $cflags -libs $libs] {
187 if {$tclstubs} {
188 if {![cc-check-functions Tcl_InitStubs]} {
189 incr libtclfailcount
190 }
191 } else {
192 if {![cc-check-functions Tcl_CreateInterp]} {
193 incr libtclfailcount
194 }
195 }
196 }
197 }
198 if {$libtclfailcount >= 2} {
199 if {$tclstubs} {
200 user-error "Cannot find a usable Tcl stubs library $msg"
201 } else {
202 user-error "Cannot find a usable Tcl library $msg"
203 }
204
--- auto.def
+++ auto.def
@@ -164,40 +164,40 @@
164 } else {
165 set libs "$tclconfig(TCL_LIB_SPEC) $tclconfig(TCL_LIBS)"
166 }
167 set cflags $tclconfig(TCL_INCLUDE_SPEC)
168 if {!$tclprivatestubs} {
169 set foundtcl 0; # Did we find a working Tcl library?
170 cc-with [list -cflags $cflags -libs $libs] {
171 if {$tclstubs} {
172 if {[cc-check-functions Tcl_InitStubs]} {
173 set foundtcl 1
174 }
175 } else {
176 if {[cc-check-functions Tcl_CreateInterp]} {
177 set foundtcl 1
178 }
179 }
180 }
181 if {!$foundtcl && [string match *-lieee* $libs]} {
182 # On some systems, using "-lieee" from TCL_LIB_SPEC appears
183 # to cause issues.
184 msg-result "Removing \"-lieee\" and retrying for Tcl..."
185 set libs [string map [list -lieee ""] $libs]
186 cc-with [list -cflags $cflags -libs $libs] {
187 if {$tclstubs} {
188 if {[cc-check-functions Tcl_InitStubs]} {
189 set foundtcl 1
190 }
191 } else {
192 if {[cc-check-functions Tcl_CreateInterp]} {
193 set foundtcl 1
194 }
195 }
196 }
197 }
198 if {!$foundtcl} {
199 if {$tclstubs} {
200 user-error "Cannot find a usable Tcl stubs library $msg"
201 } else {
202 user-error "Cannot find a usable Tcl library $msg"
203 }
204

Keyboard Shortcuts

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