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