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