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