summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2010-02-09 22:55:13 +0000
committerMåns Rullgård <mans@mansr.com>2010-02-09 22:55:13 +0000
commit645d26520a1a1900a89f2811eb78a5d637ca7877 (patch)
tree296c738a229b05bfef2c1cd6e7693cff0aac8a51 /configure
parent0104b608ca588c7c4c8078650e34b63cbf9e9b4c (diff)
Special check for math.h functions
These are often, contrary to standards, implemented only as macros or compiler-builtin functions without an actual symbol definition. Originally committed as revision 21734 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure31
1 files changed, 21 insertions, 10 deletions
diff --git a/configure b/configure
index 732a8d057d..73b5787caa 100755
--- a/configure
+++ b/configure
@@ -668,6 +668,17 @@ int main(void){ $func(); }
EOF
}
+check_mathfunc(){
+ log check_func "$@"
+ func=$1
+ shift
+ disable $func
+ check_ld "$@" <<EOF && enable $func
+#include <math.h>
+int main(void){ $func(0); return 0; }
+EOF
+}
+
check_func_headers(){
log check_func_headers "$@"
headers=$1
@@ -2519,16 +2530,16 @@ done
check_lib math.h sin -lm
check_lib va/va.h vaInitialize -lva
-check_func exp2
-check_func exp2f
-check_func llrint
-check_func log2
-check_func log2f
-check_func lrint
-check_func lrintf
-check_func round
-check_func roundf
-check_func truncf
+check_mathfunc exp2
+check_mathfunc exp2f
+check_mathfunc llrint
+check_mathfunc log2
+check_mathfunc log2f
+check_mathfunc lrint
+check_mathfunc lrintf
+check_mathfunc round
+check_mathfunc roundf
+check_mathfunc truncf
# these are off by default, so fail if requested and not available
enabled avisynth && require2 vfw32 "windows.h vfw.h" AVIFileInit -lavifil32