Mercurial > gnulib
annotate m4/atan2f.m4 @ 40057:b06060465f09
maint: Run 'make update-copyright'
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Tue, 01 Jan 2019 00:25:11 +0100 |
parents | 10eb9086bea0 |
children |
rev | line source |
---|---|
18583
f0ac93bb7317
atan2f: Avoid redefinition error on MSVC.
Bruno Haible <bruno@clisp.org>
parents:
18189
diff
changeset
|
1 # atan2f.m4 serial 3 |
40057
b06060465f09
maint: Run 'make update-copyright'
Paul Eggert <eggert@cs.ucla.edu>
parents:
19484
diff
changeset
|
2 dnl Copyright (C) 2011-2019 Free Software Foundation, Inc. |
15890 | 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_ATAN2F], | |
8 [ | |
9 AC_REQUIRE([gl_MATH_H_DEFAULTS]) | |
10 AC_REQUIRE([gl_FUNC_ATAN2]) | |
11 | |
16580
fdbe3125f81a
math: Ensure declarations of math functions.
Bruno Haible <bruno@clisp.org>
parents:
16201
diff
changeset
|
12 dnl Persuade glibc <math.h> to declare atan2f(). |
fdbe3125f81a
math: Ensure declarations of math functions.
Bruno Haible <bruno@clisp.org>
parents:
16201
diff
changeset
|
13 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) |
fdbe3125f81a
math: Ensure declarations of math functions.
Bruno Haible <bruno@clisp.org>
parents:
16201
diff
changeset
|
14 |
15890 | 15 dnl Test whether atan2f() exists. Assume that atan2f(), if it exists, is |
16 dnl defined in the same library as atan2(). | |
17 save_LIBS="$LIBS" | |
18 LIBS="$LIBS $ATAN2_LIBM" | |
19 AC_CHECK_FUNCS([atan2f]) | |
20 LIBS="$save_LIBS" | |
21 if test $ac_cv_func_atan2f = yes; then | |
22 ATAN2F_LIBM="$ATAN2_LIBM" | |
23 else | |
24 HAVE_ATAN2F=0 | |
18583
f0ac93bb7317
atan2f: Avoid redefinition error on MSVC.
Bruno Haible <bruno@clisp.org>
parents:
18189
diff
changeset
|
25 dnl If the function is declared but does not appear to exist, it may be |
f0ac93bb7317
atan2f: Avoid redefinition error on MSVC.
Bruno Haible <bruno@clisp.org>
parents:
18189
diff
changeset
|
26 dnl defined as an inline function. In order to avoid a conflict, we have |
f0ac93bb7317
atan2f: Avoid redefinition error on MSVC.
Bruno Haible <bruno@clisp.org>
parents:
18189
diff
changeset
|
27 dnl to define rpl_atan2f, not atan2f. |
f0ac93bb7317
atan2f: Avoid redefinition error on MSVC.
Bruno Haible <bruno@clisp.org>
parents:
18189
diff
changeset
|
28 AC_CHECK_DECLS([atan2f], [REPLACE_ATAN2F=1], , [[#include <math.h>]]) |
15890 | 29 ATAN2F_LIBM="$ATAN2_LIBM" |
30 fi | |
31 AC_SUBST([ATAN2F_LIBM]) | |
32 ]) |