[FFmpeg-cvslog] configure: fix tests for 2-arg math functions

Mans Rullgard git at videolan.org
Sat Oct 27 15:09:01 CEST 2012


ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Fri Oct 26 14:42:47 2012 +0100| [1aa07aa21c4ee39f0ed5fcd33d8259eed74bd3ab] | committer: Mans Rullgard

configure: fix tests for 2-arg math functions

Signed-off-by: Mans Rullgard <mans at mansr.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1aa07aa21c4ee39f0ed5fcd33d8259eed74bd3ab
---

 configure |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index bfa3a61..81f945f 100755
--- a/configure
+++ b/configure
@@ -785,11 +785,13 @@ EOF
 check_mathfunc(){
     log check_mathfunc "$@"
     func=$1
-    shift
+    narg=$2
+    shift 2
+    test $narg = 2 && args="f, g" || args="f"
     disable $func
     check_ld "$@" <<EOF && enable $func
 #include <math.h>
-float foo(float f) { return $func(f); }
+float foo(float f, float g) { return $func($args); }
 int main(void){ return 0; }
 EOF
 }
@@ -3306,8 +3308,12 @@ done
 check_lib math.h sin -lm && LIBM="-lm"
 enabled vaapi && require vaapi va/va.h vaInitialize -lva
 
+atan2f_args=2
+ldexpf_args=2
+powf_args=2
+
 for func in $MATH_FUNCS; do
-    check_mathfunc $func
+    eval check_mathfunc $func \${${func}_args:-1}
 done
 
 # these are off by default, so fail if requested and not available



More information about the ffmpeg-cvslog mailing list