AC_MSG_CHECKING(for lrint)
AC_CHECK_DECL(lrint,
  AC_DEFINE(HAVE_LRINT,1,[Define if lrint is supported]),
  AC_DEFINE(HAVE_LRINT,0,[Define if lrint is not supported]),
  [#include <math.h>]
)

AC_MSG_CHECKING(for lrintf)
AC_CHECK_DECL(lrintf,
  AC_DEFINE(HAVE_LRINTF,1,[Define if lrintf is supported]),
  AC_DEFINE(HAVE_LRINTF,0,[Define if lrintf is not supported]),
  [#include <math.h>]
)

