Fossil SCM
Fix auto.def, such that it works with Tcl 9 as well
Commit
7a43dcbe151f1f4b609a0a0f5c1cda1698fa76381bdd1b8aaf14fbdba0355cf3
Parent
3eda24a5fe59ab9…
1 file changed
+8
-2
M
auto.def
+8
-2
| --- auto.def | ||
| +++ auto.def | ||
| @@ -95,13 +95,14 @@ | ||
| 95 | 95 | # or a version of tclsh that we find unsuitable below! |
| 96 | 96 | cc-check-progs tclsh |
| 97 | 97 | set hbtd /usr/local/Cellar/tcl-tk |
| 98 | 98 | if {[string equal false [get-define TCLSH]]} { |
| 99 | 99 | msg-result "WARNING: 'make test' will not run here." |
| 100 | + set v 8.6 | |
| 100 | 101 | } else { |
| 101 | 102 | set v [exec sh -c "echo 'puts \$tcl_version' | tclsh"] |
| 102 | - if {[expr {$v >= 8.6}]} { | |
| 103 | + if {$v >= 8.6} { | |
| 103 | 104 | msg-result "Found Tclsh version $v in the PATH." |
| 104 | 105 | define TCLSH tclsh |
| 105 | 106 | } elseif {[file isdirectory $hbtd]} { |
| 106 | 107 | # This is a macOS system with the Homebrew version of Tcl/Tk |
| 107 | 108 | # installed. Select the newest version. It won't normally be |
| @@ -626,18 +627,23 @@ | ||
| 626 | 627 | |
| 627 | 628 | # |
| 628 | 629 | # Handle the --with-tcl flag. |
| 629 | 630 | # |
| 630 | 631 | proc handle-with-tcl {} { |
| 632 | + global v | |
| 631 | 633 | set tclpath [opt-val with-tcl] |
| 632 | 634 | if {$tclpath eq ""} { |
| 633 | 635 | return |
| 634 | 636 | } |
| 635 | 637 | set tclprivatestubs [opt-bool with-tcl-private-stubs] |
| 636 | 638 | # Note parse-tclconfig-sh is in autosetup/local.tcl |
| 637 | 639 | if {$tclpath eq "1"} { |
| 638 | - set tcldir [file dirname $::autosetup(dir)]/compat/tcl-8.6 | |
| 640 | + if {$v >= 9.0} { | |
| 641 | + set tcldir [file dirname $::autosetup(dir)]/compat/tcl-9.0 | |
| 642 | + } else { | |
| 643 | + set tcldir [file dirname $::autosetup(dir)]/compat/tcl-8.6 | |
| 644 | + } | |
| 639 | 645 | if {$tclprivatestubs} { |
| 640 | 646 | set tclconfig(TCL_INCLUDE_SPEC) -I$tcldir/generic |
| 641 | 647 | set tclconfig(TCL_VERSION) {Private Stubs} |
| 642 | 648 | set tclconfig(TCL_PATCH_LEVEL) {} |
| 643 | 649 | set tclconfig(TCL_PREFIX) $tcldir |
| 644 | 650 |
| --- auto.def | |
| +++ auto.def | |
| @@ -95,13 +95,14 @@ | |
| 95 | # or a version of tclsh that we find unsuitable below! |
| 96 | cc-check-progs tclsh |
| 97 | set hbtd /usr/local/Cellar/tcl-tk |
| 98 | if {[string equal false [get-define TCLSH]]} { |
| 99 | msg-result "WARNING: 'make test' will not run here." |
| 100 | } else { |
| 101 | set v [exec sh -c "echo 'puts \$tcl_version' | tclsh"] |
| 102 | if {[expr {$v >= 8.6}]} { |
| 103 | msg-result "Found Tclsh version $v in the PATH." |
| 104 | define TCLSH tclsh |
| 105 | } elseif {[file isdirectory $hbtd]} { |
| 106 | # This is a macOS system with the Homebrew version of Tcl/Tk |
| 107 | # installed. Select the newest version. It won't normally be |
| @@ -626,18 +627,23 @@ | |
| 626 | |
| 627 | # |
| 628 | # Handle the --with-tcl flag. |
| 629 | # |
| 630 | proc handle-with-tcl {} { |
| 631 | set tclpath [opt-val with-tcl] |
| 632 | if {$tclpath eq ""} { |
| 633 | return |
| 634 | } |
| 635 | set tclprivatestubs [opt-bool with-tcl-private-stubs] |
| 636 | # Note parse-tclconfig-sh is in autosetup/local.tcl |
| 637 | if {$tclpath eq "1"} { |
| 638 | set tcldir [file dirname $::autosetup(dir)]/compat/tcl-8.6 |
| 639 | if {$tclprivatestubs} { |
| 640 | set tclconfig(TCL_INCLUDE_SPEC) -I$tcldir/generic |
| 641 | set tclconfig(TCL_VERSION) {Private Stubs} |
| 642 | set tclconfig(TCL_PATCH_LEVEL) {} |
| 643 | set tclconfig(TCL_PREFIX) $tcldir |
| 644 |
| --- auto.def | |
| +++ auto.def | |
| @@ -95,13 +95,14 @@ | |
| 95 | # or a version of tclsh that we find unsuitable below! |
| 96 | cc-check-progs tclsh |
| 97 | set hbtd /usr/local/Cellar/tcl-tk |
| 98 | if {[string equal false [get-define TCLSH]]} { |
| 99 | msg-result "WARNING: 'make test' will not run here." |
| 100 | set v 8.6 |
| 101 | } else { |
| 102 | set v [exec sh -c "echo 'puts \$tcl_version' | tclsh"] |
| 103 | if {$v >= 8.6} { |
| 104 | msg-result "Found Tclsh version $v in the PATH." |
| 105 | define TCLSH tclsh |
| 106 | } elseif {[file isdirectory $hbtd]} { |
| 107 | # This is a macOS system with the Homebrew version of Tcl/Tk |
| 108 | # installed. Select the newest version. It won't normally be |
| @@ -626,18 +627,23 @@ | |
| 627 | |
| 628 | # |
| 629 | # Handle the --with-tcl flag. |
| 630 | # |
| 631 | proc handle-with-tcl {} { |
| 632 | global v |
| 633 | set tclpath [opt-val with-tcl] |
| 634 | if {$tclpath eq ""} { |
| 635 | return |
| 636 | } |
| 637 | set tclprivatestubs [opt-bool with-tcl-private-stubs] |
| 638 | # Note parse-tclconfig-sh is in autosetup/local.tcl |
| 639 | if {$tclpath eq "1"} { |
| 640 | if {$v >= 9.0} { |
| 641 | set tcldir [file dirname $::autosetup(dir)]/compat/tcl-9.0 |
| 642 | } else { |
| 643 | set tcldir [file dirname $::autosetup(dir)]/compat/tcl-8.6 |
| 644 | } |
| 645 | if {$tclprivatestubs} { |
| 646 | set tclconfig(TCL_INCLUDE_SPEC) -I$tcldir/generic |
| 647 | set tclconfig(TCL_VERSION) {Private Stubs} |
| 648 | set tclconfig(TCL_PATCH_LEVEL) {} |
| 649 | set tclconfig(TCL_PREFIX) $tcldir |
| 650 |