Merge remote-tracking branch 'qatar/master'
* qatar/master: configure: fix indentation in option parsing loop Conflicts: configure Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
8be18ffd6a
128
configure
vendored
128
configure
vendored
@ -2202,70 +2202,70 @@ do_random(){
|
|||||||
for opt do
|
for opt do
|
||||||
optval="${opt#*=}"
|
optval="${opt#*=}"
|
||||||
case "$opt" in
|
case "$opt" in
|
||||||
--extra-ldflags=*) add_ldflags $optval
|
--extra-ldflags=*) add_ldflags $optval
|
||||||
;;
|
;;
|
||||||
--extra-libs=*) add_extralibs $optval
|
--extra-libs=*) add_extralibs $optval
|
||||||
;;
|
;;
|
||||||
--disable-devices) disable $INDEV_LIST $OUTDEV_LIST
|
--disable-devices) disable $INDEV_LIST $OUTDEV_LIST
|
||||||
;;
|
;;
|
||||||
--enable-debug=*) debuglevel="$optval"
|
--enable-debug=*) debuglevel="$optval"
|
||||||
;;
|
;;
|
||||||
--disable-programs)
|
--disable-programs)
|
||||||
disable $PROGRAM_LIST
|
disable $PROGRAM_LIST
|
||||||
;;
|
;;
|
||||||
--disable-everything)
|
--disable-everything)
|
||||||
map 'eval unset \${$(toupper ${v%s})_LIST}' $COMPONENT_LIST
|
map 'eval unset \${$(toupper ${v%s})_LIST}' $COMPONENT_LIST
|
||||||
;;
|
;;
|
||||||
--enable-random|--disable-random)
|
--enable-random|--disable-random)
|
||||||
action=${opt%%-random}
|
action=${opt%%-random}
|
||||||
do_random ${action#--} $COMPONENT_LIST
|
do_random ${action#--} $COMPONENT_LIST
|
||||||
;;
|
;;
|
||||||
--enable-random=*|--disable-random=*)
|
--enable-random=*|--disable-random=*)
|
||||||
action=${opt%%-random=*}
|
action=${opt%%-random=*}
|
||||||
do_random ${action#--} $optval
|
do_random ${action#--} $optval
|
||||||
;;
|
;;
|
||||||
--enable-*=*|--disable-*=*)
|
--enable-*=*|--disable-*=*)
|
||||||
eval $(echo "${opt%%=*}" | sed 's/--/action=/;s/-/ thing=/')
|
eval $(echo "${opt%%=*}" | sed 's/--/action=/;s/-/ thing=/')
|
||||||
is_in "${thing}s" $COMPONENT_LIST || die_unknown "$opt"
|
is_in "${thing}s" $COMPONENT_LIST || die_unknown "$opt"
|
||||||
eval list=\$$(toupper $thing)_LIST
|
eval list=\$$(toupper $thing)_LIST
|
||||||
name=$(echo "${optval}" | sed "s/,/_${thing}|/g")_${thing}
|
name=$(echo "${optval}" | sed "s/,/_${thing}|/g")_${thing}
|
||||||
list=$(filter "$name" $list)
|
list=$(filter "$name" $list)
|
||||||
[ "$list" = "" ] && warn "Option $opt did not match anything"
|
[ "$list" = "" ] && warn "Option $opt did not match anything"
|
||||||
$action $list
|
$action $list
|
||||||
;;
|
;;
|
||||||
--enable-?*|--disable-?*)
|
--enable-?*|--disable-?*)
|
||||||
eval $(echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g')
|
eval $(echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g')
|
||||||
if is_in $option $COMPONENT_LIST; then
|
if is_in $option $COMPONENT_LIST; then
|
||||||
test $action = disable && action=unset
|
test $action = disable && action=unset
|
||||||
eval $action \$$(toupper ${option%s})_LIST
|
eval $action \$$(toupper ${option%s})_LIST
|
||||||
elif is_in $option $CMDLINE_SELECT; then
|
elif is_in $option $CMDLINE_SELECT; then
|
||||||
$action $option
|
$action $option
|
||||||
else
|
else
|
||||||
die_unknown $opt
|
die_unknown $opt
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
--list-*)
|
--list-*)
|
||||||
NAME="${opt#--list-}"
|
NAME="${opt#--list-}"
|
||||||
is_in $NAME $COMPONENT_LIST || die_unknown $opt
|
is_in $NAME $COMPONENT_LIST || die_unknown $opt
|
||||||
NAME=${NAME%s}
|
NAME=${NAME%s}
|
||||||
eval show_list $NAME \$$(toupper $NAME)_LIST
|
eval show_list $NAME \$$(toupper $NAME)_LIST
|
||||||
;;
|
;;
|
||||||
--help|-h) show_help
|
--help|-h) show_help
|
||||||
;;
|
;;
|
||||||
--fatal-warnings) enable fatal_warnings
|
--fatal-warnings) enable fatal_warnings
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
optname="${opt%%=*}"
|
optname="${opt%%=*}"
|
||||||
optname="${optname#--}"
|
optname="${optname#--}"
|
||||||
optname=$(echo "$optname" | sed 's/-/_/g')
|
optname=$(echo "$optname" | sed 's/-/_/g')
|
||||||
if is_in $optname $CMDLINE_SET; then
|
if is_in $optname $CMDLINE_SET; then
|
||||||
eval $optname='$optval'
|
eval $optname='$optval'
|
||||||
elif is_in $optname $CMDLINE_APPEND; then
|
elif is_in $optname $CMDLINE_APPEND; then
|
||||||
append $optname "$optval"
|
append $optname "$optval"
|
||||||
else
|
else
|
||||||
die_unknown $opt
|
die_unknown $opt
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user