aboutsummaryrefslogtreecommitdiff
path: root/auto.def
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2017-09-17 20:03:13 +1000
committerSteve Bennett <steveb@workware.net.au>2017-09-21 16:34:08 +1000
commit0df9e798b92ef5421de0f269d1f86e088555d2d0 (patch)
tree0245e5d4ca7c647d03df79961d7000f0b2ee059d /auto.def
parentca82a715e435685aa047f169c2896c3559d53828 (diff)
downloadjimtcl-0df9e798b92ef5421de0f269d1f86e088555d2d0.zip
jimtcl-0df9e798b92ef5421de0f269d1f86e088555d2d0.tar.gz
jimtcl-0df9e798b92ef5421de0f269d1f86e088555d2d0.tar.bz2
configure: --with-mod and --with-ext allow commas
Makes it a bit easier to type on the command line. e.g. --with-mod=binary,zlib --with-ext=sqlite3 Spaces are still accepted, as are multiple instances of --with-mod, --with-ext and --without-ext Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'auto.def')
-rw-r--r--auto.def23
1 files changed, 17 insertions, 6 deletions
diff --git a/auto.def b/auto.def
index eab6056..889c158 100644
--- a/auto.def
+++ b/auto.def
@@ -21,7 +21,7 @@ options {
docs=1 => "don't build or install the documentation"
docdir:path => "path to install docs (if built)"
random-hash => "randomise hash tables. more secure but hash table results are not predicable"
- with-jim-ext: {with-ext:"ext1 ext2 ..."} => {
+ with-jim-ext: {with-ext:"ext1,ext2,..."} => {
Specify additional jim extensions to include.
These are enabled by default:
@@ -61,11 +61,11 @@ options {
sqlite3 - Interface to sqlite3
win32 - Interface to win32
}
- with-out-jim-ext: {without-ext:"default|ext1 ext2 ..."} => {
+ with-out-jim-ext: {without-ext:"default|ext1,ext2,..."} => {
Specify jim extensions to exclude.
If 'default' is given, the default extensions will not be added.
}
- with-jim-extmod: {with-mod:"ext1 ext2 ..."} => {
+ with-jim-extmod: {with-mod:"ext1,ext2,..."} => {
Specify jim extensions to build as separate modules (either C or Tcl).
Note that not all extensions can be built as loadable modules.
}
@@ -379,11 +379,22 @@ proc check-metakit {} {
return $found
}
+# Takes a list of module names, separated by spaces or commas
+# and returns them as a single list
+proc join-ext-names {list} {
+ set result {}
+ # Replace comma with space in each list then concatenate the result
+ foreach l $list {
+ lappend result {*}[string map {, " "} $l]
+ }
+ return $result
+}
+
# Set up the withinfo array based on what the user selected
global withinfo
-set withinfo(without) [join [opt-val {without-ext with-out-jim-ext}]]
-set withinfo(ext) [join [opt-val {with-ext with-jim-ext}]]
-set withinfo(mod) [join [opt-val {with-mod with-jim-extmod}]]
+set withinfo(without) [join-ext-names [opt-val {without-ext with-out-jim-ext}]]
+set withinfo(ext) [join-ext-names [opt-val {with-ext with-jim-ext}]]
+set withinfo(mod) [join-ext-names [opt-val {with-mod with-jim-extmod}]]
set withinfo(nodefault) 0
set withinfo(optional) [opt-bool full]
if {$withinfo(without) eq "default"} {