aboutsummaryrefslogtreecommitdiff
path: root/autosetup
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2021-01-06 13:03:37 +1000
committerSteve Bennett <steveb@workware.net.au>2021-01-06 13:07:12 +1000
commit9d096635508de22f7925a55b09fd077a0d127669 (patch)
treec7ad8210ece02fb855215e8252fae87dda35cd2f /autosetup
parent7894e90c8aa5f4317bd9c4b631e2c30e74c9b1b2 (diff)
downloadjimtcl-9d096635508de22f7925a55b09fd077a0d127669.zip
jimtcl-9d096635508de22f7925a55b09fd077a0d127669.tar.gz
jimtcl-9d096635508de22f7925a55b09fd077a0d127669.tar.bz2
configure: Add --allextmod option
To build all non-default extensions as modules if prerequisites are met. Also move the extension help out of the main help since it is quite long and show it with --extinfo. Now extension help is generated from $extdb to avoid the help and the module configuration becoming out of sync. Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'autosetup')
-rw-r--r--autosetup/local.tcl15
1 files changed, 14 insertions, 1 deletions
diff --git a/autosetup/local.tcl b/autosetup/local.tcl
index c31ba18..8d5da9b 100644
--- a/autosetup/local.tcl
+++ b/autosetup/local.tcl
@@ -194,13 +194,16 @@ proc add-pkgconfig-deps {ext pkgs asmodule} {
# and the extension database ($extdb) to determine
# what is selected, and in what way.
#
+# If $allextmod is 1, extensions that would normally be disabled
+# are enabled as modules if their prerequisites are met
+#
# The results are available via ext-get-status
# And a dictionary is returned containing four keys:
# static-c extensions which are static C
# static-tcl extensions which are static Tcl
# module-c extensions which are C modules
# module-tcl extensions which are Tcl modules
-proc check-extensions {} {
+proc check-extensions {allextmod} {
global extdb withinfo
# Check valid extension names
@@ -213,6 +216,7 @@ proc check-extensions {} {
set extlist [lsort [dict keys [dict get $extdb attrs]]]
set withinfo(maybe) {}
+ set withinfo(maybemod) {}
# Now work out the default status. We have.
# normal case, include !off, !optional if possible
@@ -223,9 +227,15 @@ proc check-extensions {} {
} else {
foreach i $extlist {
if {[ext-has $i off]} {
+ if {$allextmod} {
+ lappend withinfo(maybemod) $i
+ }
continue
}
if {[ext-has $i optional] && !$withinfo(optional)} {
+ if {$allextmod} {
+ lappend withinfo(maybemod) $i
+ }
continue
}
lappend withinfo(maybe) $i
@@ -242,6 +252,9 @@ proc check-extensions {} {
foreach i $withinfo(maybe) {
check-extension-status $i wanted
}
+ foreach i $withinfo(maybemod) {
+ check-extension-status $i wanted 1
+ }
array set extinfo {static-c {} static-tcl {} module-c {} module-tcl {}}