--- linux-2.2.15pre16/scripts/Menuconfig.orig Thu Mar 30 12:28:26 2000 +++ linux-2.2.15pre16/scripts/Menuconfig Thu Mar 30 12:48:11 2000 @@ -68,6 +68,10 @@ # # 24 January 1999, Michael Elizabeth Chastain, # - Improve the exit message (Jeff Ronne). +# +# 30 March 2000, Matthias Andree +# - allow dep_tristate to accept more than one dependency as +# Configure (make config) does # @@ -188,13 +192,31 @@ # else in the kernel. # function dep_tristate () { - if [ "$3" = "y" ]; then - tristate "$1" "$2" - else if [ "$3" = "m" ]; then - mod_bool "$1" "$2" - else - define_bool "$2" n - fi; fi + local label=$1 + local name=$2 + shift 2 + local need_module=0 + + while [ $# -gt 0 ]; do + case "$1" in + n) + define_bool "$name" "n" + return + ;; + m) + need_module=1 + ;; + esac + shift + done + + if [ need_module -eq 0 ]; then + tristate "$label" "$name" + else + mod_bool "$label" "$name" + fi + # note that the while loop above already defined the variable + # to "n" if the dependencies are not met. } # @@ -992,9 +1014,16 @@ } function dep_tristate () { - set_x_info "$2" "n" - if [ "$3" = "m" -a "$x" = "y" ]; then x="m"; fi - define_bool "$2" "$x" + local opt=$2 + shift 2 + set_x_info "$opt" "n" + if [ "$x" = "y" ] ; then + while [ $# -gt 0 ]; do + if [ "$1" = "m" ]; then x="m" ; fi + shift + done + fi + define_bool "$opt" "$x" } function int () {