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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
52fb6ed99832 New module 'atan2f'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3 dnl This file is free software; the Free Software Foundation
52fb6ed99832 New module 'atan2f'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4 dnl gives unlimited permission to copy and/or distribute it,
52fb6ed99832 New module 'atan2f'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 dnl with or without modifications, as long as this notice is preserved.
52fb6ed99832 New module 'atan2f'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6
52fb6ed99832 New module 'atan2f'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 AC_DEFUN([gl_FUNC_ATAN2F],
52fb6ed99832 New module 'atan2f'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8 [
52fb6ed99832 New module 'atan2f'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9 AC_REQUIRE([gl_MATH_H_DEFAULTS])
52fb6ed99832 New module 'atan2f'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 AC_REQUIRE([gl_FUNC_ATAN2])
52fb6ed99832 New module 'atan2f'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
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
52fb6ed99832 New module 'atan2f'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15 dnl Test whether atan2f() exists. Assume that atan2f(), if it exists, is
52fb6ed99832 New module 'atan2f'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16 dnl defined in the same library as atan2().
52fb6ed99832 New module 'atan2f'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17 save_LIBS="$LIBS"
52fb6ed99832 New module 'atan2f'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18 LIBS="$LIBS $ATAN2_LIBM"
52fb6ed99832 New module 'atan2f'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
19 AC_CHECK_FUNCS([atan2f])
52fb6ed99832 New module 'atan2f'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20 LIBS="$save_LIBS"
52fb6ed99832 New module 'atan2f'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
21 if test $ac_cv_func_atan2f = yes; then
52fb6ed99832 New module 'atan2f'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
22 ATAN2F_LIBM="$ATAN2_LIBM"
52fb6ed99832 New module 'atan2f'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
23 else
52fb6ed99832 New module 'atan2f'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
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
52fb6ed99832 New module 'atan2f'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
29 ATAN2F_LIBM="$ATAN2_LIBM"
52fb6ed99832 New module 'atan2f'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
30 fi
52fb6ed99832 New module 'atan2f'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
31 AC_SUBST([ATAN2F_LIBM])
52fb6ed99832 New module 'atan2f'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
32 ])