mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
configure: fix tests for 2-arg math functions
Signed-off-by: Mans Rullgard <mans@mansr.com>
This commit is contained in:
parent
ca7f59119b
commit
1aa07aa21c
12
configure
vendored
12
configure
vendored
@ -785,11 +785,13 @@ EOF
|
|||||||
check_mathfunc(){
|
check_mathfunc(){
|
||||||
log check_mathfunc "$@"
|
log check_mathfunc "$@"
|
||||||
func=$1
|
func=$1
|
||||||
shift
|
narg=$2
|
||||||
|
shift 2
|
||||||
|
test $narg = 2 && args="f, g" || args="f"
|
||||||
disable $func
|
disable $func
|
||||||
check_ld "$@" <<EOF && enable $func
|
check_ld "$@" <<EOF && enable $func
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
float foo(float f) { return $func(f); }
|
float foo(float f, float g) { return $func($args); }
|
||||||
int main(void){ return 0; }
|
int main(void){ return 0; }
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
@ -3306,8 +3308,12 @@ done
|
|||||||
check_lib math.h sin -lm && LIBM="-lm"
|
check_lib math.h sin -lm && LIBM="-lm"
|
||||||
enabled vaapi && require vaapi va/va.h vaInitialize -lva
|
enabled vaapi && require vaapi va/va.h vaInitialize -lva
|
||||||
|
|
||||||
|
atan2f_args=2
|
||||||
|
ldexpf_args=2
|
||||||
|
powf_args=2
|
||||||
|
|
||||||
for func in $MATH_FUNCS; do
|
for func in $MATH_FUNCS; do
|
||||||
check_mathfunc $func
|
eval check_mathfunc $func \${${func}_args:-1}
|
||||||
done
|
done
|
||||||
|
|
||||||
# these are off by default, so fail if requested and not available
|
# these are off by default, so fail if requested and not available
|
||||||
|
Loading…
Reference in New Issue
Block a user