Blame m4/lrint.m4

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