comparison m4/atanl.m4 @ 13578:1e26f884665f

Modernize AC_TRY_LINK invocations.
author Bruno Haible <bruno@clisp.org>
date Mon, 19 Jul 2010 23:30:26 +0200
parents 2614b91f7908
children 97fc9a21a8fb
comparison
equal deleted inserted replaced
13577:d53740f6f336 13578:1e26f884665f
1 # atanl.m4 serial 2 1 # atanl.m4 serial 3
2 dnl Copyright (C) 2010 Free Software Foundation, Inc. 2 dnl Copyright (C) 2010 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation 3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it, 4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved. 5 dnl with or without modifications, as long as this notice is preserved.
6 6
12 12
13 ATANL_LIBM= 13 ATANL_LIBM=
14 AC_CACHE_CHECK([whether atanl() can be used without linking with libm], 14 AC_CACHE_CHECK([whether atanl() can be used without linking with libm],
15 [gl_cv_func_atanl_no_libm], 15 [gl_cv_func_atanl_no_libm],
16 [ 16 [
17 AC_TRY_LINK([#ifndef __NO_MATH_INLINES 17 AC_LINK_IFELSE(
18 # define __NO_MATH_INLINES 1 /* for glibc */ 18 [AC_LANG_PROGRAM(
19 #endif 19 [[#ifndef __NO_MATH_INLINES
20 #include <math.h> 20 # define __NO_MATH_INLINES 1 /* for glibc */
21 long double x;], 21 #endif
22 [return atanl (x) > 1;], 22 #include <math.h>
23 long double x;]],
24 [[return atanl (x) > 1;]])],
23 [gl_cv_func_atanl_no_libm=yes], 25 [gl_cv_func_atanl_no_libm=yes],
24 [gl_cv_func_atanl_no_libm=no]) 26 [gl_cv_func_atanl_no_libm=no])
25 ]) 27 ])
26 if test $gl_cv_func_atanl_no_libm = no; then 28 if test $gl_cv_func_atanl_no_libm = no; then
27 AC_CACHE_CHECK([whether atanl() can be used with libm], 29 AC_CACHE_CHECK([whether atanl() can be used with libm],
28 [gl_cv_func_atanl_in_libm], 30 [gl_cv_func_atanl_in_libm],
29 [ 31 [
30 save_LIBS="$LIBS" 32 save_LIBS="$LIBS"
31 LIBS="$LIBS -lm" 33 LIBS="$LIBS -lm"
32 AC_TRY_LINK([#ifndef __NO_MATH_INLINES 34 AC_LINK_IFELSE(
33 # define __NO_MATH_INLINES 1 /* for glibc */ 35 [AC_LANG_PROGRAM(
34 #endif 36 [[#ifndef __NO_MATH_INLINES
35 #include <math.h> 37 # define __NO_MATH_INLINES 1 /* for glibc */
36 long double x;], 38 #endif
37 [return atanl (x) > 1;], 39 #include <math.h>
40 long double x;]],
41 [[return atanl (x) > 1;]])],
38 [gl_cv_func_atanl_in_libm=yes], 42 [gl_cv_func_atanl_in_libm=yes],
39 [gl_cv_func_atanl_in_libm=no]) 43 [gl_cv_func_atanl_in_libm=no])
40 LIBS="$save_LIBS" 44 LIBS="$save_LIBS"
41 ]) 45 ])
42 if test $gl_cv_func_atanl_in_libm = yes; then 46 if test $gl_cv_func_atanl_in_libm = yes; then