annotate src/libsndfile-1.0.27/M4/lrintf.m4 @ 168:ceec0dd9ec9c
Replace these with versions built using an older toolset (so as to avoid ABI compatibilities when linking on Ubuntu 14.04 for packaging purposes)
author |
Chris Cannam <cannam@all-day-breakfast.com> |
date |
Fri, 07 Feb 2020 11:51:13 +0000 |
parents |
cd6cdf86811e |
children |
|
rev |
line source |
cannam@125
|
1 dnl @synopsis MN_C99_FUNC_LRINTF
|
cannam@125
|
2 dnl
|
cannam@125
|
3 dnl Check whether C99's lrintf function is available.
|
cannam@125
|
4 dnl @version 1.3 Feb 12 2002
|
cannam@125
|
5 dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
cannam@125
|
6 dnl
|
cannam@125
|
7 dnl Permission to use, copy, modify, distribute, and sell this file for any
|
cannam@125
|
8 dnl purpose is hereby granted without fee, provided that the above copyright
|
cannam@125
|
9 dnl and this permission notice appear in all copies. No representations are
|
cannam@125
|
10 dnl made about the suitability of this software for any purpose. It is
|
cannam@125
|
11 dnl provided "as is" without express or implied warranty.
|
cannam@125
|
12 dnl
|
cannam@125
|
13 AC_DEFUN([MN_C99_FUNC_LRINTF],
|
cannam@125
|
14 [AC_CACHE_CHECK(for lrintf,
|
cannam@125
|
15 ac_cv_c99_lrintf,
|
cannam@125
|
16 [
|
cannam@125
|
17 lrintf_save_CFLAGS=$CFLAGS
|
cannam@125
|
18 CFLAGS="-lm"
|
cannam@125
|
19 AC_TRY_LINK([
|
cannam@125
|
20 #define _ISOC9X_SOURCE 1
|
cannam@125
|
21 #define _ISOC99_SOURCE 1
|
cannam@125
|
22 #define __USE_ISOC99 1
|
cannam@125
|
23 #define __USE_ISOC9X 1
|
cannam@125
|
24
|
cannam@125
|
25 #include <math.h>
|
cannam@125
|
26 ], if (!lrintf(3.14159)) lrintf(2.7183);, ac_cv_c99_lrintf=yes, ac_cv_c99_lrintf=no)
|
cannam@125
|
27
|
cannam@125
|
28 CFLAGS=$lrintf_save_CFLAGS
|
cannam@125
|
29
|
cannam@125
|
30 ])
|
cannam@125
|
31
|
cannam@125
|
32 if test "$ac_cv_c99_lrintf" = yes; then
|
cannam@125
|
33 AC_DEFINE(HAVE_LRINTF, 1,
|
cannam@125
|
34 [Define if you have C99's lrintf function.])
|
cannam@125
|
35 fi
|
cannam@125
|
36 ])# MN_C99_FUNC_LRINTF
|
cannam@125
|
37
|