annotate src/libsamplerate-0.1.9/M4/lrintf.m4 @ 65:a69c1527268d

OSX binaries for Cap'n Proto
author Chris Cannam <cannam@all-day-breakfast.com>
date Wed, 05 Jul 2017 09:46:34 +0100
parents 481f5f8c5634
children
rev   line source
Chris@41 1 dnl @synopsis AC_C99_FUNC_LRINTF
Chris@41 2 dnl
Chris@41 3 dnl Check whether C99's lrintf function is available.
Chris@41 4 dnl @version 1.3 Feb 12 2002
Chris@41 5 dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
Chris@41 6 dnl
Chris@41 7 dnl Permission to use, copy, modify, distribute, and sell this file for any
Chris@41 8 dnl purpose is hereby granted without fee, provided that the above copyright
Chris@41 9 dnl and this permission notice appear in all copies. No representations are
Chris@41 10 dnl made about the suitability of this software for any purpose. It is
Chris@41 11 dnl provided "as is" without express or implied warranty.
Chris@41 12 dnl
Chris@41 13 AC_DEFUN([AC_C99_FUNC_LRINTF],
Chris@41 14 [AC_CACHE_CHECK(for lrintf,
Chris@41 15 ac_cv_c99_lrintf,
Chris@41 16 [
Chris@41 17 lrintf_save_CFLAGS=$CFLAGS
Chris@41 18 CFLAGS="-lm"
Chris@41 19 AC_TRY_LINK([
Chris@41 20 #define _ISOC9X_SOURCE 1
Chris@41 21 #define _ISOC99_SOURCE 1
Chris@41 22 #define __USE_ISOC99 1
Chris@41 23 #define __USE_ISOC9X 1
Chris@41 24
Chris@41 25 #include <math.h>
Chris@41 26 ], if (!lrintf(3.14159)) lrintf(2.7183);, ac_cv_c99_lrintf=yes, ac_cv_c99_lrintf=no)
Chris@41 27
Chris@41 28 CFLAGS=$lrintf_save_CFLAGS
Chris@41 29
Chris@41 30 ])
Chris@41 31
Chris@41 32 if test "$ac_cv_c99_lrintf" = yes; then
Chris@41 33 AC_DEFINE(HAVE_LRINTF, 1,
Chris@41 34 [Define if you have C99's lrintf function.])
Chris@41 35 fi
Chris@41 36 ])# AC_C99_FUNC_LRINTF
Chris@41 37