Bundle libsamplerate
[audio-libsamplerate.git] / libsamplerate / M4 / lrintf.m4
CommitLineData
8529da43
MG
1dnl @synopsis AC_C99_FUNC_LRINTF
2dnl
3dnl Check whether C99's lrintf function is available.
4dnl @version 1.3 Feb 12 2002
5dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
6dnl
7dnl Permission to use, copy, modify, distribute, and sell this file for any
8dnl purpose is hereby granted without fee, provided that the above copyright
9dnl and this permission notice appear in all copies. No representations are
10dnl made about the suitability of this software for any purpose. It is
11dnl provided "as is" without express or implied warranty.
12dnl
13AC_DEFUN([AC_C99_FUNC_LRINTF],
14[AC_CACHE_CHECK(for lrintf,
15 ac_cv_c99_lrintf,
16[
17lrintf_save_CFLAGS=$CFLAGS
18CFLAGS="-lm"
19AC_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], if (!lrintf(3.14159)) lrintf(2.7183);, ac_cv_c99_lrintf=yes, ac_cv_c99_lrintf=no)
27
28CFLAGS=$lrintf_save_CFLAGS
29
30])
31
32if test "$ac_cv_c99_lrintf" = yes; then
33 AC_DEFINE(HAVE_LRINTF, 1,
34 [Define if you have C99's lrintf function.])
35fi
36])# AC_C99_FUNC_LRINTF
37
This page took 0.010455 seconds and 4 git commands to generate.