Fossil SCM

Patch for autosetup to restore previous behavior of the --with options to configure, by Steve Bennett.

mistachkin 2017-05-12 13:49 trunk
Commit 4e1450ae3cd5e4db9f112bd418ff9f16891c040655610fcae9cfc0f0504ff52f
1 file changed +3 -3
--- autosetup/autosetup
+++ autosetup/autosetup
@@ -1169,12 +1169,12 @@
11691169
11701170
# Simple getopt module
11711171
11721172
# Parse everything out of the argv list which looks like an option
11731173
# Everything which doesn't look like an option, or is after --, is left unchanged
1174
-# Understands --enable-xxx and --with-xxx as synonyms for --xxx to enable the boolean option xxx.
1175
-# Understands --disable-xxx and --without-xxx to disable the boolean option xxx.
1174
+# Understands --enable-xxx as a synonym for --xxx to enable the boolean option xxx.
1175
+# Understands --disable-xxx to disable the boolean option xxx.
11761176
#
11771177
# The returned value is a dictionary keyed by option name
11781178
# Each value is a list of {type value} ... where type is "bool" or "str".
11791179
# The value for a boolean option is 0 or 1. The value of a string option is the value given.
11801180
proc getopt {argvname} {
@@ -1196,11 +1196,11 @@
11961196
}
11971197
11981198
if {[regexp {^--([^=][^=]+)=(.*)$} $arg -> name value]} {
11991199
# --name=value
12001200
dict lappend opts $name [list str $value]
1201
- } elseif {[regexp {^--(enable-|disable-|with-|without-)?([^=]*)$} $arg -> prefix name]} {
1201
+ } elseif {[regexp {^--(enable-|disable-)?([^=]*)$} $arg -> prefix name]} {
12021202
if {$prefix in {enable- with- ""}} {
12031203
set value 1
12041204
} else {
12051205
set value 0
12061206
}
12071207
--- autosetup/autosetup
+++ autosetup/autosetup
@@ -1169,12 +1169,12 @@
1169
1170 # Simple getopt module
1171
1172 # Parse everything out of the argv list which looks like an option
1173 # Everything which doesn't look like an option, or is after --, is left unchanged
1174 # Understands --enable-xxx and --with-xxx as synonyms for --xxx to enable the boolean option xxx.
1175 # Understands --disable-xxx and --without-xxx to disable the boolean option xxx.
1176 #
1177 # The returned value is a dictionary keyed by option name
1178 # Each value is a list of {type value} ... where type is "bool" or "str".
1179 # The value for a boolean option is 0 or 1. The value of a string option is the value given.
1180 proc getopt {argvname} {
@@ -1196,11 +1196,11 @@
1196 }
1197
1198 if {[regexp {^--([^=][^=]+)=(.*)$} $arg -> name value]} {
1199 # --name=value
1200 dict lappend opts $name [list str $value]
1201 } elseif {[regexp {^--(enable-|disable-|with-|without-)?([^=]*)$} $arg -> prefix name]} {
1202 if {$prefix in {enable- with- ""}} {
1203 set value 1
1204 } else {
1205 set value 0
1206 }
1207
--- autosetup/autosetup
+++ autosetup/autosetup
@@ -1169,12 +1169,12 @@
1169
1170 # Simple getopt module
1171
1172 # Parse everything out of the argv list which looks like an option
1173 # Everything which doesn't look like an option, or is after --, is left unchanged
1174 # Understands --enable-xxx as a synonym for --xxx to enable the boolean option xxx.
1175 # Understands --disable-xxx to disable the boolean option xxx.
1176 #
1177 # The returned value is a dictionary keyed by option name
1178 # Each value is a list of {type value} ... where type is "bool" or "str".
1179 # The value for a boolean option is 0 or 1. The value of a string option is the value given.
1180 proc getopt {argvname} {
@@ -1196,11 +1196,11 @@
1196 }
1197
1198 if {[regexp {^--([^=][^=]+)=(.*)$} $arg -> name value]} {
1199 # --name=value
1200 dict lappend opts $name [list str $value]
1201 } elseif {[regexp {^--(enable-|disable-)?([^=]*)$} $arg -> prefix name]} {
1202 if {$prefix in {enable- with- ""}} {
1203 set value 1
1204 } else {
1205 set value 0
1206 }
1207

Keyboard Shortcuts

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