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