Blame m4/lrintf.m4

Packit Service 4387a0
dnl @synopsis AC_C99_FUNC_LRINTF
Packit Service 4387a0
dnl
Packit Service 4387a0
dnl Check whether C99's lrintf function is available.
Packit Service 4387a0
dnl @version 1.1
Packit Service 4387a0
dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
Packit Service 4387a0
dnl
Packit Service 4387a0
dnl Permission to use, copy, modify, distribute, and sell this file for any 
Packit Service 4387a0
dnl purpose is hereby granted without fee, provided that the above copyright 
Packit Service 4387a0
dnl and this permission notice appear in all copies.  No representations are
Packit Service 4387a0
dnl made about the suitability of this software for any purpose.  It is 
Packit Service 4387a0
dnl provided "as is" without express or implied warranty.
Packit Service 4387a0
dnl
Packit Service 4387a0
AC_DEFUN([AC_C99_FUNC_LRINTF],
Packit Service 4387a0
[AC_CACHE_CHECK(for lrintf,
Packit Service 4387a0
  ac_cv_c99_lrintf,
Packit Service 4387a0
[AC_TRY_LINK([
Packit Service 4387a0
#define		_ISOC9X_SOURCE	1
Packit Service 4387a0
#define 	_ISOC99_SOURCE	1
Packit Service 4387a0
#define		__USE_ISOC99	1
Packit Service 4387a0
#define 	__USE_ISOC9X	1
Packit Service 4387a0
#include	<math.h>],
Packit Service 4387a0
[	int value = lrintf (0.432) ; ], ac_cv_c99_lrintf=yes, ac_cv_c99_lrintf=no)])
Packit Service 4387a0
if test $ac_cv_c99_lrintf = yes; then
Packit Service 4387a0
  AC_DEFINE(HAVE_LRINTF, 1,
Packit Service 4387a0
            [Define if you have C99's lrintf function.])
Packit Service 4387a0
fi
Packit Service 4387a0
])# AC_C99_LRINTF