Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 95707
Collapse All | Expand All

(-)faad2/configure.in (+37 lines)
Lines 49-54 Link Here
49
fi
49
fi
50
])
50
])
51
51
52
dnl @synopsis AC_C99_FUNC_LRINTF
53
dnl
54
dnl Check whether C99's lrintf function is available.
55
dnl @version 1.3        Feb 12 2002
56
dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
57
dnl
58
dnl Permission to use, copy, modify, distribute, and sell this file for any
59
dnl purpose is hereby granted without fee, provided that the above copyright
60
dnl and this permission notice appear in all copies.  No representations are
61
dnl made about the suitability of this software for any purpose.  It is
62
dnl provided "as is" without express or implied warranty.
63
dnl
64
AC_DEFUN([AC_C99_FUNC_LRINTF],
65
[AC_CACHE_CHECK(for lrintf,
66
  ac_cv_c99_lrintf,
67
[
68
lrintf_save_CFLAGS=$CFLAGS
69
CFLAGS="-O -lm"
70
AC_TRY_LINK([
71
#define         _ISOC9X_SOURCE  1
72
#define         _ISOC99_SOURCE  1
73
#define         __USE_ISOC99    1
74
#define         __USE_ISOC9X    1
75
76
#include <math.h>
77
], if (!lrintf(3.14159)) lrintf(2.7183);, ac_cv_c99_lrintf=yes, ac_cv_c99_lrintf=no)
78
79
CFLAGS=$lrintf_save_CFLAGS
80
81
])
82
83
if test "$ac_cv_c99_lrintf" = yes; then
84
  AC_DEFINE(HAVE_LRINTF, 1,
85
            [Define if you have C99's lrintf function.])
86
fi
87
])# AC_C99_FUNC_LRINTF
88
AC_C99_FUNC_LRINTF
52
89
53
MY_CHECK_TYPEDEF_FROM_INCLUDE([float32_t temp],
90
MY_CHECK_TYPEDEF_FROM_INCLUDE([float32_t temp],
54
        [#include <sys/types.h>,
91
        [#include <sys/types.h>,
(-)faad2/libfaad/common.h (+2 lines)
Lines 308-313 Link Here
308
        return i;
308
        return i;
309
    }
309
    }
310
  #elif (defined(__i386__) && defined(__GNUC__))
310
  #elif (defined(__i386__) && defined(__GNUC__))
311
    #ifndef HAVE_LRINTF
311
    #define HAS_LRINTF
312
    #define HAS_LRINTF
312
    // from http://www.stereopsis.com/FPU.html
313
    // from http://www.stereopsis.com/FPU.html
313
    static INLINE int lrintf(float f)
314
    static INLINE int lrintf(float f)
Lines 320-325 Link Here
320
            : "m" (f));
321
            : "m" (f));
321
        return i;
322
        return i;
322
    }
323
    }
324
    #endif /* HAVE_LRINTF */
323
  #endif
325
  #endif
324
326
325
327

Return to bug 95707