OSDN Git Service

configure: slightly more robust looking check for math functions.
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 13 Sep 2011 15:29:49 +0000 (17:29 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 13 Sep 2011 15:34:19 +0000 (17:34 +0200)
I dont know on which system the prior check failed but an advanced
linker on some platform might have optimized func() out as unreachable.

Patch taken from http://floss.freebox.fr
Author: unknown

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
configure

index 2843794..300852d 100755 (executable)
--- a/configure
+++ b/configure
@@ -708,7 +708,7 @@ check_mathfunc(){
     check_ld "$@" <<EOF && enable $func
 #include <math.h>
 float foo(float f) { return $func(f); }
-int main(void){ return 0; }
+int main(void){ return (int) foo; }
 EOF
 }