Fossil SCM
Make the --with-tcl configure option able to cope with systems where using '-lieee' from TCL_LIB_SPEC appears to cause issues.
Commit
7a0d543a78500ff4af4a9261d4bc00310c38bbf5
Parent
98e694422a79a54…
2 files changed
+29
-4
+29
-4
M
auto.def
+29
-4
| --- auto.def | ||
| +++ auto.def | ||
| @@ -164,20 +164,45 @@ | ||
| 164 | 164 | } else { |
| 165 | 165 | set libs "$tclconfig(TCL_LIB_SPEC) $tclconfig(TCL_LIBS)" |
| 166 | 166 | } |
| 167 | 167 | set cflags $tclconfig(TCL_INCLUDE_SPEC) |
| 168 | 168 | if {!$tclprivatestubs} { |
| 169 | + set foundtcl 0; # Did we find a working Tcl library? | |
| 169 | 170 | cc-with [list -cflags $cflags -libs $libs] { |
| 170 | 171 | if {$tclstubs} { |
| 171 | - if {![cc-check-functions Tcl_InitStubs]} { | |
| 172 | - user-error "Cannot find a usable Tcl stubs library $msg" | |
| 172 | + if {[cc-check-functions Tcl_InitStubs]} { | |
| 173 | + set foundtcl 1 | |
| 173 | 174 | } |
| 174 | 175 | } else { |
| 175 | - if {![cc-check-functions Tcl_CreateInterp]} { | |
| 176 | - user-error "Cannot find a usable Tcl library $msg" | |
| 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 | + } | |
| 177 | 195 | } |
| 178 | 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 | + } | |
| 179 | 204 | } |
| 180 | 205 | } |
| 181 | 206 | set version $tclconfig(TCL_VERSION)$tclconfig(TCL_PATCH_LEVEL) |
| 182 | 207 | msg-result "Found Tcl $version at $tclconfig(TCL_PREFIX)" |
| 183 | 208 | if {!$tclprivatestubs} { |
| 184 | 209 |
| --- auto.def | |
| +++ auto.def | |
| @@ -164,20 +164,45 @@ | |
| 164 | } else { |
| 165 | set libs "$tclconfig(TCL_LIB_SPEC) $tclconfig(TCL_LIBS)" |
| 166 | } |
| 167 | set cflags $tclconfig(TCL_INCLUDE_SPEC) |
| 168 | if {!$tclprivatestubs} { |
| 169 | cc-with [list -cflags $cflags -libs $libs] { |
| 170 | if {$tclstubs} { |
| 171 | if {![cc-check-functions Tcl_InitStubs]} { |
| 172 | user-error "Cannot find a usable Tcl stubs library $msg" |
| 173 | } |
| 174 | } else { |
| 175 | if {![cc-check-functions Tcl_CreateInterp]} { |
| 176 | user-error "Cannot find a usable Tcl library $msg" |
| 177 | } |
| 178 | } |
| 179 | } |
| 180 | } |
| 181 | set version $tclconfig(TCL_VERSION)$tclconfig(TCL_PATCH_LEVEL) |
| 182 | msg-result "Found Tcl $version at $tclconfig(TCL_PREFIX)" |
| 183 | if {!$tclprivatestubs} { |
| 184 |
| --- auto.def | |
| +++ auto.def | |
| @@ -164,20 +164,45 @@ | |
| 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 | } |
| 205 | } |
| 206 | set version $tclconfig(TCL_VERSION)$tclconfig(TCL_PATCH_LEVEL) |
| 207 | msg-result "Found Tcl $version at $tclconfig(TCL_PREFIX)" |
| 208 | if {!$tclprivatestubs} { |
| 209 |
M
auto.def
+29
-4
| --- auto.def | ||
| +++ auto.def | ||
| @@ -164,20 +164,45 @@ | ||
| 164 | 164 | } else { |
| 165 | 165 | set libs "$tclconfig(TCL_LIB_SPEC) $tclconfig(TCL_LIBS)" |
| 166 | 166 | } |
| 167 | 167 | set cflags $tclconfig(TCL_INCLUDE_SPEC) |
| 168 | 168 | if {!$tclprivatestubs} { |
| 169 | + set foundtcl 0; # Did we find a working Tcl library? | |
| 169 | 170 | cc-with [list -cflags $cflags -libs $libs] { |
| 170 | 171 | if {$tclstubs} { |
| 171 | - if {![cc-check-functions Tcl_InitStubs]} { | |
| 172 | - user-error "Cannot find a usable Tcl stubs library $msg" | |
| 172 | + if {[cc-check-functions Tcl_InitStubs]} { | |
| 173 | + set foundtcl 1 | |
| 173 | 174 | } |
| 174 | 175 | } else { |
| 175 | - if {![cc-check-functions Tcl_CreateInterp]} { | |
| 176 | - user-error "Cannot find a usable Tcl library $msg" | |
| 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 | + } | |
| 177 | 195 | } |
| 178 | 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 | + } | |
| 179 | 204 | } |
| 180 | 205 | } |
| 181 | 206 | set version $tclconfig(TCL_VERSION)$tclconfig(TCL_PATCH_LEVEL) |
| 182 | 207 | msg-result "Found Tcl $version at $tclconfig(TCL_PREFIX)" |
| 183 | 208 | if {!$tclprivatestubs} { |
| 184 | 209 |
| --- auto.def | |
| +++ auto.def | |
| @@ -164,20 +164,45 @@ | |
| 164 | } else { |
| 165 | set libs "$tclconfig(TCL_LIB_SPEC) $tclconfig(TCL_LIBS)" |
| 166 | } |
| 167 | set cflags $tclconfig(TCL_INCLUDE_SPEC) |
| 168 | if {!$tclprivatestubs} { |
| 169 | cc-with [list -cflags $cflags -libs $libs] { |
| 170 | if {$tclstubs} { |
| 171 | if {![cc-check-functions Tcl_InitStubs]} { |
| 172 | user-error "Cannot find a usable Tcl stubs library $msg" |
| 173 | } |
| 174 | } else { |
| 175 | if {![cc-check-functions Tcl_CreateInterp]} { |
| 176 | user-error "Cannot find a usable Tcl library $msg" |
| 177 | } |
| 178 | } |
| 179 | } |
| 180 | } |
| 181 | set version $tclconfig(TCL_VERSION)$tclconfig(TCL_PATCH_LEVEL) |
| 182 | msg-result "Found Tcl $version at $tclconfig(TCL_PREFIX)" |
| 183 | if {!$tclprivatestubs} { |
| 184 |
| --- auto.def | |
| +++ auto.def | |
| @@ -164,20 +164,45 @@ | |
| 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 | } |
| 205 | } |
| 206 | set version $tclconfig(TCL_VERSION)$tclconfig(TCL_PATCH_LEVEL) |
| 207 | msg-result "Found Tcl $version at $tclconfig(TCL_PREFIX)" |
| 208 | if {!$tclprivatestubs} { |
| 209 |