patch-1.3.52 linux/scripts/Configure
Next file: linux/Documentation/Configure.help
Previous file: linux/net/ipv4/tcp.c
Back to the patch index
Back to the overall index
- Lines: 91
- Date:
Fri Dec 29 15:15:16 1995
- Orig file:
v1.3.51/linux/scripts/Configure
- Orig date:
Wed Dec 13 09:02:47 1995
diff -u --recursive --new-file v1.3.51/linux/scripts/Configure linux/scripts/Configure
@@ -22,6 +22,9 @@
#
# 301195 (boldt@math.ucsb.edu) - added help text support
#
+# 281295 Paul Gortmaker - make tri_state functions collapse to boolean
+# if module support is not enabled.
+#
#
# Make sure we're really running bash.
@@ -137,7 +140,8 @@
function bool () {
def=$(eval echo "\${$2:-'n'}")
case "$def" in
- "y") defprompt="Y/n/?"
+ "y" | "m") defprompt="Y/n/?"
+ def="y"
;;
"n") defprompt="N/y/?"
;;
@@ -161,28 +165,32 @@
# tristate question define
#
function tristate () {
- def=$(eval echo "\${$2:-'n'}")
- case "$def" in
- "y") defprompt="Y/m/n/?"
- ;;
- "m") defprompt="M/n/y/?"
- ;;
- "n") defprompt="N/y/m/?"
- ;;
- esac
- while :; do
- readln "$1 ($2) [$defprompt] " "$def"
- case "$ans" in
- [yY] | [yY]es ) define_bool "$2" "y"
- break ;;
- [nN] | [nN]o ) define_bool "$2" "n"
- break ;;
- [mM] ) define_bool "$2" "m"
- break ;;
- * ) help "$2"
- ;;
+ if [ "$MODULES" != "y" ]; then
+ bool "$1" "$2"
+ else
+ def=$(eval echo "\${$2:-'n'}")
+ case "$def" in
+ "y") defprompt="Y/m/n/?"
+ ;;
+ "m") defprompt="M/n/y/?"
+ ;;
+ "n") defprompt="N/y/m/?"
+ ;;
esac
- done
+ while :; do
+ readln "$1 ($2) [$defprompt] " "$def"
+ case "$ans" in
+ [yY] | [yY]es ) define_bool "$2" "y"
+ break ;;
+ [nN] | [nN]o ) define_bool "$2" "n"
+ break ;;
+ [mM] ) define_bool "$2" "m"
+ break ;;
+ * ) help "$2"
+ ;;
+ esac
+ done
+ fi
}
#
@@ -200,6 +208,7 @@
if [ "$3" != "m" ]; then
tristate "$1" "$2"
else
+ if [ "$MODULES" = "y" ]; then
case "$def" in
"y" | "m") defprompt="M/n/?"
def="m"
@@ -226,6 +235,7 @@
;;
esac
done
+ fi
fi
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this