Mercurial > mplayer.hg
comparison configure @ 25507:8dfe02cab924
Add detection of *lrint* and round* functions to configure.
author | eugeni |
---|---|
date | Fri, 28 Dec 2007 17:23:57 +0000 |
parents | a5dd78186fdc |
children | 47f2a9304623 |
comparison
equal
deleted
inserted
replaced
25506:a5dd78186fdc | 25507:8dfe02cab924 |
---|---|
2755 if test "$_posix4" = yes ; then | 2755 if test "$_posix4" = yes ; then |
2756 _ld_extra="$_ld_extra -lposix4" | 2756 _ld_extra="$_ld_extra -lposix4" |
2757 fi | 2757 fi |
2758 echores "$_posix4" | 2758 echores "$_posix4" |
2759 | 2759 |
2760 echocheck "lrintf" | 2760 for func in llrint lrint lrintf round roundf; do |
2761 echocheck $func | |
2761 cat > $TMPC << EOF | 2762 cat > $TMPC << EOF |
2762 #include <math.h> | 2763 #include <math.h> |
2763 int main(void) { long (*foo)(float); foo = lrintf; (void)(*foo)(0.0); return 0; } | 2764 int main(void) { long (*foo)(float); foo = $func; (void)(*foo)(0.0); return 0; } |
2764 EOF | 2765 EOF |
2765 _lrintf=no | 2766 eval _$func=no |
2766 cc_check -D_GNU_SOURCE $_ld_lm && _lrintf=yes | 2767 cc_check -D_GNU_SOURCE $_ld_lm && eval _$func=yes |
2767 if test "$_lrintf" = yes ; then | 2768 if eval test "x\$_$func" = "xyes"; then |
2768 _def_lrintf="#define HAVE_LRINTF 1" | 2769 eval _def_$func="\"#define HAVE_`echo $func | tr '[a-z]' '[A-Z]'` 1\"" |
2769 else | 2770 echores yes |
2770 _def_lrintf="#undef HAVE_LRINTF" | 2771 else |
2771 fi | 2772 eval _def_$func="\"#undef HAVE_`echo $func | tr '[a-z]' '[A-Z]'`\"" |
2772 echores "$_lrintf" | 2773 echores no |
2774 fi | |
2775 done | |
2773 | 2776 |
2774 | 2777 |
2775 echocheck "mkstemp" | 2778 echocheck "mkstemp" |
2776 cat > $TMPC << EOF | 2779 cat > $TMPC << EOF |
2777 #include <stdlib.h> | 2780 #include <stdlib.h> |
8327 ** --enable/--disable options of the ./configure script! | 8330 ** --enable/--disable options of the ./configure script! |
8328 ** See ./configure --help for details. | 8331 ** See ./configure --help for details. |
8329 ** | 8332 ** |
8330 *---------------------------------------------------------------------------*/ | 8333 *---------------------------------------------------------------------------*/ |
8331 | 8334 |
8332 /* C99 lrintf function available */ | 8335 /* C99 *lrint* and round* functions available */ |
8336 $_def_llrint | |
8337 $_def_lrint | |
8333 $_def_lrintf | 8338 $_def_lrintf |
8339 $_def_round | |
8340 $_def_roundf | |
8334 | 8341 |
8335 /* mkstemp support */ | 8342 /* mkstemp support */ |
8336 $_def_mkstemp | 8343 $_def_mkstemp |
8337 | 8344 |
8338 /* nanosleep support */ | 8345 /* nanosleep support */ |