- dnl value can be native, nas or both. yes is allowed
- dnl as a backwards compatible synonym for native
- case "$val" in
- y | ye | yes ) val=native ;;
- n | no | non | none ) val=no;;
- na | nat | nati | nativ | native ) val=native ;;
- ne | net | neta | netau | netaud | netaudi | netaudio | nas ) val=nas ;;
- b | bo | bot | both ) val=both;;
- * ) USAGE_ERROR(["The \`--$optname' option must have one of these values:
- \`native', \`nas', \`both', or \`none'."]) ;;
- esac
- eval "$opt=\"$val\""
+ dnl values is a subset of all,native,nas,esd
+ dnl or their negatives: none,nonative,nonas,noesd
+ for x in `echo "$val" | sed -e 's/,/ /g'` ; do
+ case "$x" in
+ dnl all and none are only permitted as the first in the list.
+ n | no | non | none ) new_sdefault=no ;;
+ a | al | all | both ) new_sdefault=yes ;;
+
+ native ) with_native_sound=yes ;;
+ nonative ) with_native_sound=no ;;
+
+ nas ) with_nas_sound=yes ;;
+ nonas ) with_nas_sound=no ;;
+
+ esd ) with_esd=yes ;;
+ noesd ) with_esh=no ;;
+
+ * ) bogus_sound=yes ;;
+ esac
+ if test "$bogus_sound" -o \
+ \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
+ types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
+ USAGE_ERROR(["Valid types for the \`--$optname' option are:
+ $types.
+The default is native,esd."])
+ elif test -n "$new_sdefault" ; then
+ with_native_sound=$new_sdefault
+ with_nas_sound=$new_sdefault
+ with_esd=$new_sdefault
+ new_sdefault= # reset this
+ fi
+ sound_notfirst=true
+ done