summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authoreugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-12-28 17:23:57 +0000
committereugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-12-28 17:23:57 +0000
commit43de62a54ddff472c181f60443fa29900fe33e42 (patch)
tree9f76a221dbb9ae13a2357fdc4d3e9ae3ed5985f9 /configure
parenta9d779578d707b711a3ed3be9f621c61c9844875 (diff)
downloadmpv-43de62a54ddff472c181f60443fa29900fe33e42.tar.bz2
mpv-43de62a54ddff472c181f60443fa29900fe33e42.tar.xz
Add detection of *lrint* and round* functions to configure.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25535 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure25
1 files changed, 16 insertions, 9 deletions
diff --git a/configure b/configure
index ee1de77a55..e494366d6a 100755
--- a/configure
+++ b/configure
@@ -2757,19 +2757,22 @@ if test "$_posix4" = yes ; then
fi
echores "$_posix4"
-echocheck "lrintf"
+for func in llrint lrint lrintf round roundf; do
+echocheck $func
cat > $TMPC << EOF
#include <math.h>
-int main(void) { long (*foo)(float); foo = lrintf; (void)(*foo)(0.0); return 0; }
+int main(void) { long (*foo)(float); foo = $func; (void)(*foo)(0.0); return 0; }
EOF
-_lrintf=no
-cc_check -D_GNU_SOURCE $_ld_lm && _lrintf=yes
-if test "$_lrintf" = yes ; then
- _def_lrintf="#define HAVE_LRINTF 1"
+eval _$func=no
+cc_check -D_GNU_SOURCE $_ld_lm && eval _$func=yes
+if eval test "x\$_$func" = "xyes"; then
+ eval _def_$func="\"#define HAVE_`echo $func | tr '[a-z]' '[A-Z]'` 1\""
+ echores yes
else
- _def_lrintf="#undef HAVE_LRINTF"
+ eval _def_$func="\"#undef HAVE_`echo $func | tr '[a-z]' '[A-Z]'`\""
+ echores no
fi
-echores "$_lrintf"
+done
echocheck "mkstemp"
@@ -8329,8 +8332,12 @@ $_def_vcd
**
*---------------------------------------------------------------------------*/
-/* C99 lrintf function available */
+/* C99 *lrint* and round* functions available */
+$_def_llrint
+$_def_lrint
$_def_lrintf
+$_def_round
+$_def_roundf
/* mkstemp support */
$_def_mkstemp