maint: update copyright
[gnulib.git] / m4 / rintl.m4
1 # rintl.m4 serial 4
2 dnl Copyright (C) 2011-2014 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved.
6
7 AC_DEFUN([gl_FUNC_RINTL],
8 [
9   AC_REQUIRE([gl_MATH_H_DEFAULTS])
10   AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
11
12   dnl Persuade glibc <math.h> to declare rintl().
13   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
14
15   dnl Determine RINTL_LIBM.
16   gl_MATHFUNC([rintl], [long double], [(long double)])
17   if test $gl_cv_func_rintl_no_libm = no \
18      && test $gl_cv_func_rintl_in_libm = no; then
19     HAVE_RINTL=0
20     dnl Find libraries needed to link lib/rintl.c.
21     if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
22       AC_REQUIRE([gl_FUNC_RINT])
23       RINTL_LIBM="$RINT_LIBM"
24     else
25       RINTL_LIBM=
26     fi
27   fi
28   AC_SUBST([RINTL_LIBM])
29 ])