~ubuntu-branches/ubuntu/quantal/libsamplerate/quantal

« back to all changes in this revision

Viewing changes to M4/lrint.m4

  • Committer: Package Import Robot
  • Author(s): Erik de Castro Lopo
  • Date: 2011-08-16 18:32:49 UTC
  • mfrom: (1.1.6 upstream) (4.1.5 sid)
  • Revision ID: package-import@ubuntu.com-20110816183249-9vbim26wlxvjsq04
Tags: 0.1.8-1
* New upstream (Closes: #637691).
* debian/patches/ : Remove uneeded patches (fixed upstream).
* debian/control : Remove quilt from build-deps.

Show diffs side-by-side

added added

removed removed

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