Mercurial > gnulib
annotate m4/printf-frexp.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 |
---|---|
13578
1e26f884665f
Modernize AC_TRY_LINK invocations.
Bruno Haible <bruno@clisp.org>
parents:
13460
diff
changeset
|
1 # printf-frexp.m4 serial 5 |
40057
b06060465f09
maint: Run 'make update-copyright'
Paul Eggert <eggert@cs.ucla.edu>
parents:
19484
diff
changeset
|
2 dnl Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc. |
8240 | 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 dnl Check how to define printf_frexp() without linking with libm. | |
8 | |
9 AC_DEFUN([gl_FUNC_PRINTF_FREXP], | |
10 [ | |
13460
54037f4be4a4
Unify tests that set gl_cv_func_frexp_no_libm.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
11 AC_REQUIRE([gl_CHECK_FREXP_NO_LIBM]) |
8240 | 12 if test $gl_cv_func_frexp_no_libm = yes; then |
8495
eff68e94da66
Don't use the system's frexp() if it does not work (example: NetBSD 3.0).
Bruno Haible <bruno@clisp.org>
parents:
8240
diff
changeset
|
13 gl_FUNC_FREXP_WORKS |
eff68e94da66
Don't use the system's frexp() if it does not work (example: NetBSD 3.0).
Bruno Haible <bruno@clisp.org>
parents:
8240
diff
changeset
|
14 case "$gl_cv_func_frexp_works" in |
eff68e94da66
Don't use the system's frexp() if it does not work (example: NetBSD 3.0).
Bruno Haible <bruno@clisp.org>
parents:
8240
diff
changeset
|
15 *yes) |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
8495
diff
changeset
|
16 AC_DEFINE([HAVE_FREXP_IN_LIBC], [1], |
8495
eff68e94da66
Don't use the system's frexp() if it does not work (example: NetBSD 3.0).
Bruno Haible <bruno@clisp.org>
parents:
8240
diff
changeset
|
17 [Define if the frexp function is available in libc.]) |
eff68e94da66
Don't use the system's frexp() if it does not work (example: NetBSD 3.0).
Bruno Haible <bruno@clisp.org>
parents:
8240
diff
changeset
|
18 ;; |
eff68e94da66
Don't use the system's frexp() if it does not work (example: NetBSD 3.0).
Bruno Haible <bruno@clisp.org>
parents:
8240
diff
changeset
|
19 esac |
8240 | 20 fi |
21 | |
22 AC_CACHE_CHECK([whether ldexp can be used without linking with libm], | |
23 [gl_cv_func_ldexp_no_libm], | |
24 [ | |
13578
1e26f884665f
Modernize AC_TRY_LINK invocations.
Bruno Haible <bruno@clisp.org>
parents:
13460
diff
changeset
|
25 AC_LINK_IFELSE( |
1e26f884665f
Modernize AC_TRY_LINK invocations.
Bruno Haible <bruno@clisp.org>
parents:
13460
diff
changeset
|
26 [AC_LANG_PROGRAM( |
1e26f884665f
Modernize AC_TRY_LINK invocations.
Bruno Haible <bruno@clisp.org>
parents:
13460
diff
changeset
|
27 [[#include <math.h> |
1e26f884665f
Modernize AC_TRY_LINK invocations.
Bruno Haible <bruno@clisp.org>
parents:
13460
diff
changeset
|
28 double x; |
1e26f884665f
Modernize AC_TRY_LINK invocations.
Bruno Haible <bruno@clisp.org>
parents:
13460
diff
changeset
|
29 int y;]], |
1e26f884665f
Modernize AC_TRY_LINK invocations.
Bruno Haible <bruno@clisp.org>
parents:
13460
diff
changeset
|
30 [[return ldexp (x, y) < 1;]])], |
8240 | 31 [gl_cv_func_ldexp_no_libm=yes], |
32 [gl_cv_func_ldexp_no_libm=no]) | |
33 ]) | |
34 if test $gl_cv_func_ldexp_no_libm = yes; then | |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
8495
diff
changeset
|
35 AC_DEFINE([HAVE_LDEXP_IN_LIBC], [1], |
8240 | 36 [Define if the ldexp function is available in libc.]) |
37 fi | |
38 ]) |