[FFmpeg-cvslog] build: fix detection of math functions with 2 parameters.
Michael Niedermayer
git at videolan.org
Wed Oct 24 13:21:55 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Oct 24 13:15:42 2012 +0200| [42ee9f3981979880209a60d1ac30057fcfab6e53] | committer: Michael Niedermayer
build: fix detection of math functions with 2 parameters.
The code from libav seems to have been entirely untested.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=42ee9f3981979880209a60d1ac30057fcfab6e53
---
configure | 26 +++++++++++++++++++++++---
1 file changed, 23 insertions(+), 3 deletions(-)
diff --git a/configure b/configure
index 00aafc2..50a9d02 100755
--- a/configure
+++ b/configure
@@ -860,6 +860,18 @@ int main(void){ return (int) foo; }
EOF
}
+check_math2func(){
+ log check_math2func "$@"
+ func=$1
+ shift
+ disable $func
+ check_ld "cc" "$@" <<EOF && enable $func
+#include <math.h>
+float foo(float f) { return $func(f, f); }
+int main(void){ return (int) foo; }
+EOF
+}
+
check_func_headers(){
log check_func_headers "$@"
headers=$1
@@ -1265,7 +1277,6 @@ HAVE_LIST_PUB='
MATH_FUNCS="
atanf
- atan2f
cbrtf
cosf
exp2
@@ -1273,7 +1284,6 @@ MATH_FUNCS="
expf
isinf
isnan
- ldexpf
llrint
llrintf
log2
@@ -1281,7 +1291,6 @@ MATH_FUNCS="
log10f
lrint
lrintf
- powf
rint
round
roundf
@@ -1290,6 +1299,12 @@ MATH_FUNCS="
truncf
"
+MATH2_FUNCS="
+ atan2f
+ ldexpf
+ powf
+"
+
HAVE_LIST="
$ARCH_EXT_LIST
$(add_suffix _external $ARCH_EXT_LIST)
@@ -1298,6 +1313,7 @@ HAVE_LIST="
$HAVE_LIST_PUB
$THREADS_LIST
$MATH_FUNCS
+ $MATH2_FUNCS
aligned_malloc
aligned_stack
alsa_asoundlib_h
@@ -3633,6 +3649,10 @@ for func in $MATH_FUNCS; do
check_mathfunc $func
done
+for func in $MATH2_FUNCS; do
+ check_math2func $func
+done
+
# these are off by default, so fail if requested and not available
enabled avisynth && require2 vfw32 "windows.h vfw.h" AVIFileInit -lavifil32
enabled fontconfig && require_pkg_config fontconfig "fontconfig/fontconfig.h" FcInit
More information about the ffmpeg-cvslog
mailing list