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