Commit e0f84c30 authored by James Almer's avatar James Almer

Merge commit '61a17423'

* commit '61a17423':
  configure: Miscellaneous small changes to helper functions
Merged-by: 's avatarJames Almer <jamrial@gmail.com>
parents b998a56b 61a17423
...@@ -639,13 +639,13 @@ disable_weak(){ ...@@ -639,13 +639,13 @@ disable_weak(){
enable_sanitized(){ enable_sanitized(){
for var; do for var; do
enable $(echo "$var" | sed 's/[^A-Za-z0-9_]/_/g') enable $(sanitize_var_name $var)
done done
} }
disable_sanitized(){ disable_sanitized(){
for var; do for var; do
disable $(echo "$var" | sed 's/[^A-Za-z0-9_]/_/g') disable $(sanitize_var_name $var)
done done
} }
...@@ -678,17 +678,17 @@ enable_deep_weak(){ ...@@ -678,17 +678,17 @@ enable_deep_weak(){
} }
requested(){ requested(){
test "${1#!}" = "$1" && op='=' || op=!= test "${1#!}" = "$1" && op="=" || op="!="
eval test "x\$${1#!}_requested" $op "xyes" eval test "x\$${1#!}_requested" $op "xyes"
} }
enabled(){ enabled(){
test "${1#!}" = "$1" && op='=' || op=!= test "${1#!}" = "$1" && op="=" || op="!="
eval test "x\$${1#!}" $op "xyes" eval test "x\$${1#!}" $op "xyes"
} }
disabled(){ disabled(){
test "${1#!}" = "$1" && op='=' || op=!= test "${1#!}" = "$1" && op="=" || op="!="
eval test "x\$${1#!}" $op "xno" eval test "x\$${1#!}" $op "xno"
} }
...@@ -1081,6 +1081,7 @@ check_objcflags(){ ...@@ -1081,6 +1081,7 @@ check_objcflags(){
test_ldflags(){ test_ldflags(){
log test_ldflags "$@" log test_ldflags "$@"
set -- $($ldflags_filter "$@")
check_ld "cc" "$@" <<EOF check_ld "cc" "$@" <<EOF
int main(void){ return 0; } int main(void){ return 0; }
EOF EOF
...@@ -1390,14 +1391,14 @@ require_cpp(){ ...@@ -1390,14 +1391,14 @@ require_cpp(){
} }
require_header(){ require_header(){
log require "$@" log require_header "$@"
headers="$1" headers="$1"
shift shift
check_header "$headers" "$@" || die "ERROR: $headers not found" check_header "$headers" "$@" || die "ERROR: $headers not found"
} }
require_cpp_condition(){ require_cpp_condition(){
log require "$@" log require_cpp_condition "$@"
header="$1" header="$1"
condition="$2" condition="$2"
shift 2 shift 2
......
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