annotate src/libsamplerate-0.1.9/M4/lrint.m4 @ 139:413e081fcc6f

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