patch-1.3.28 linux/scripts/Configure

Next file: linux/Makefile
Previous file: linux/net/netrom/nr_dev.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.27/linux/scripts/Configure linux/scripts/Configure
@@ -125,6 +125,36 @@
 }
 
 #
+# dep_tristate processes a tristate argument
+#
+#	tristate question define default that depends upon
+#	another option.  If the option we depend upon is a module,
+#	then the only allowable options are M or N.  If Y, then
+#	this is a normal tristate.  This is used in cases where modules
+#	are nested, and one module requires the presence of something
+#	else in the kernel.
+#
+function dep_tristate () {
+	if [ "$4" != "m" ]; then
+		tristate "$1" "$2" "$3"
+	else
+		ans=""
+		def=$(eval echo "\${$2:-$3}")
+	        case "$def" in
+        	 "y" | "m") defprompt="M/n"
+		      def="m"
+        	      ;;
+        	 "n") defprompt="N/m"
+        	      ;;
+	        esac
+		while [ "$ans" != "n" -a "$ans" != "m" ]; do
+			readln "$1 ($2) [$defprompt] " "$def"
+		done
+		define_bool "$2" "$ans"
+	fi
+}
+
+#
 # define_int sets the value of a integer argument
 #
 #	define_int define value
@@ -248,9 +278,9 @@
 fi
 . $CONFIG_IN
 
-if [ "$CONFIG_SOUND" = "y" ] ; then
-	$MAKE -C drivers/sound config || exit 1
-fi
+case "$CONFIG_SOUND" in
+	[YyMm] )	$MAKE -C drivers/sound config || exit 1 ;;
+esac
 
 rm -f .config.old
 if [ -f .config ]; then


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