Commit 74a61b5a authored by Johann's avatar Johann Committed by Johann Koenig

configure: clean up var style and set_all usage

Use quotes whenever possible and {} always for variables.

Replace multiple set_all calls with *able_feature().

Change-Id: If579d3f718bd4133cf1592b4554a8ed00cf9f2d3
parent bdeb5feb
......@@ -186,24 +186,6 @@ add_extralibs() {
# Boolean Manipulation Functions
#
enable_codec(){
enabled $1 || echo " enabling $1"
set_all yes $1
is_in $1 vp8 vp9 && \
set_all yes $1_encoder && \
set_all yes $1_decoder
}
disable_codec(){
disabled $1 || echo " disabling $1"
set_all no $1
is_in $1 vp8 vp9 && \
set_all no $1_encoder && \
set_all no $1_decoder
}
enable_feature(){
set_all yes $*
}
......@@ -220,6 +202,20 @@ disabled(){
eval test "x\$$1" = "xno"
}
enable_codec(){
enabled "${1}" || echo " enabling ${1}"
enable_feature "${1}"
is_in "${1}" vp8 vp9 && enable_feature "${1}_encoder" "${1}_decoder"
}
disable_codec(){
disabled "${1}" || echo " disabling ${1}"
disable_feature "${1}"
is_in "${1}" vp8 vp9 && disable_feature "${1}_encoder" "${1}_decoder"
}
# Iterates through positional parameters, checks to confirm the parameter has
# not been explicitly (force) disabled, and enables the setting controlled by
# the parameter when the setting is not disabled.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment