libsndfile source files.
[Faustine.git] / interpretor / libsndfile-1.0.25 / M4 / llrint.m4
1 dnl @synopsis MN_C99_FUNC_LLRINT
2 dnl
3 dnl Check whether C99's llrint function is available.
4 dnl @version 1.1 Sep 30 2002
5 dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
6 dnl
7 dnl Permission to use, copy, modify, distribute, and sell this file for any
8 dnl purpose is hereby granted without fee, provided that the above copyright
9 dnl and this permission notice appear in all copies. No representations are
10 dnl made about the suitability of this software for any purpose. It is
11 dnl provided "as is" without express or implied warranty.
12 dnl
13 AC_DEFUN([MN_C99_FUNC_LLRINT],
14 [AC_CACHE_CHECK(for llrint,
15 ac_cv_c99_llrint,
16 [
17 llrint_save_CFLAGS=$CFLAGS
18 CFLAGS="-lm"
19 AC_TRY_LINK([
20 #define _ISOC9X_SOURCE 1
21 #define _ISOC99_SOURCE 1
22 #define __USE_ISOC99 1
23 #define __USE_ISOC9X 1
24
25 #include <math.h>
26 #include <stdint.h>
27 ], int64_t x ; x = llrint(3.14159) ;, ac_cv_c99_llrint=yes, ac_cv_c99_llrint=no)
28
29 CFLAGS=$llrint_save_CFLAGS
30
31 ])
32
33 if test "$ac_cv_c99_llrint" = yes; then
34 AC_DEFINE(HAVE_LLRINT, 1,
35 [Define if you have C99's llrint function.])
36 fi
37 ])# MN_C99_FUNC_LLRINT
38