Chris@41: dnl @synopsis AC_C99_FUNC_LRINT Chris@41: dnl Chris@41: dnl Check whether C99's lrint function is available. Chris@41: dnl @version 1.3 Feb 12 2002 Chris@41: dnl @author Erik de Castro Lopo Chris@41: dnl Chris@41: dnl Permission to use, copy, modify, distribute, and sell this file for any Chris@41: dnl purpose is hereby granted without fee, provided that the above copyright Chris@41: dnl and this permission notice appear in all copies. No representations are Chris@41: dnl made about the suitability of this software for any purpose. It is Chris@41: dnl provided "as is" without express or implied warranty. Chris@41: dnl Chris@41: AC_DEFUN([AC_C99_FUNC_LRINT], Chris@41: [AC_CACHE_CHECK(for lrint, Chris@41: ac_cv_c99_lrint, Chris@41: [ Chris@41: lrint_save_CFLAGS=$CFLAGS Chris@41: CFLAGS="-lm" Chris@41: AC_TRY_LINK([ Chris@41: #define _ISOC9X_SOURCE 1 Chris@41: #define _ISOC99_SOURCE 1 Chris@41: #define __USE_ISOC99 1 Chris@41: #define __USE_ISOC9X 1 Chris@41: Chris@41: #include Chris@41: ], if (!lrint(3.14159)) lrint(2.7183);, ac_cv_c99_lrint=yes, ac_cv_c99_lrint=no) Chris@41: Chris@41: CFLAGS=$lrint_save_CFLAGS Chris@41: Chris@41: ]) Chris@41: Chris@41: if test "$ac_cv_c99_lrint" = yes; then Chris@41: AC_DEFINE(HAVE_LRINT, 1, Chris@41: [Define if you have C99's lrint function.]) Chris@41: fi Chris@41: ])# AC_C99_FUNC_LRINT Chris@41: