diff options
author | Lorenz <12514511+RincewindsHat@users.noreply.github.com> | 2023-03-11 10:34:47 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-11 10:34:47 (GMT) |
commit | 75342b53853a898bdd93c7d3da9374115bab6b6d (patch) | |
tree | 0c0af2b796bcdd8ddd42187beb5badb420db8dea /gl/m4/float_h.m4 | |
parent | 6bbe0b7b0f609ecab831dec9be7690842bf0a0fc (diff) | |
parent | 357787868b5201ec3e874e7a225b1c944cbbdb4d (diff) | |
download | monitoring-plugins-75342b53853a898bdd93c7d3da9374115bab6b6d.tar.gz |
Merge branch 'master' into patch-1refs/pull/1842/head
Diffstat (limited to 'gl/m4/float_h.m4')
-rw-r--r-- | gl/m4/float_h.m4 | 54 |
1 files changed, 31 insertions, 23 deletions
diff --git a/gl/m4/float_h.m4 b/gl/m4/float_h.m4 index 397f2d1..2f0c9c4 100644 --- a/gl/m4/float_h.m4 +++ b/gl/m4/float_h.m4 | |||
@@ -1,5 +1,5 @@ | |||
1 | # float_h.m4 serial 9 | 1 | # float_h.m4 serial 13 |
2 | dnl Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2007, 2009-2023 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. |
@@ -8,42 +8,46 @@ AC_DEFUN([gl_FLOAT_H], | |||
8 | [ | 8 | [ |
9 | AC_REQUIRE([AC_PROG_CC]) | 9 | AC_REQUIRE([AC_PROG_CC]) |
10 | AC_REQUIRE([AC_CANONICAL_HOST]) | 10 | AC_REQUIRE([AC_CANONICAL_HOST]) |
11 | FLOAT_H= | 11 | GL_GENERATE_FLOAT_H=false |
12 | REPLACE_FLOAT_LDBL=0 | 12 | REPLACE_FLOAT_LDBL=0 |
13 | case "$host_os" in | 13 | case "$host_os" in |
14 | aix* | beos* | openbsd* | mirbsd* | irix*) | 14 | aix* | beos* | openbsd* | mirbsd* | irix*) |
15 | FLOAT_H=float.h | 15 | GL_GENERATE_FLOAT_H=true |
16 | ;; | 16 | ;; |
17 | freebsd*) | 17 | freebsd* | dragonfly*) |
18 | case "$host_cpu" in | 18 | case "$host_cpu" in |
19 | changequote(,)dnl | 19 | changequote(,)dnl |
20 | i[34567]86 ) | 20 | i[34567]86 ) |
21 | changequote([,])dnl | 21 | changequote([,])dnl |
22 | FLOAT_H=float.h | 22 | GL_GENERATE_FLOAT_H=true |
23 | ;; | 23 | ;; |
24 | x86_64 ) | 24 | x86_64 ) |
25 | # On x86_64 systems, the C compiler may still be generating | 25 | # On x86_64 systems, the C compiler may still be generating |
26 | # 32-bit code. | 26 | # 32-bit code. |
27 | AC_EGREP_CPP([yes], | 27 | AC_COMPILE_IFELSE( |
28 | [#if defined __LP64__ || defined __x86_64__ || defined __amd64__ | 28 | [AC_LANG_SOURCE( |
29 | yes | 29 | [[#if defined __LP64__ || defined __x86_64__ || defined __amd64__ |
30 | #endif], | 30 | int ok; |
31 | #else | ||
32 | error fail | ||
33 | #endif | ||
34 | ]])], | ||
31 | [], | 35 | [], |
32 | [FLOAT_H=float.h]) | 36 | [GL_GENERATE_FLOAT_H=true]) |
33 | ;; | 37 | ;; |
34 | esac | 38 | esac |
35 | ;; | 39 | ;; |
36 | linux*) | 40 | linux*) |
37 | case "$host_cpu" in | 41 | case "$host_cpu" in |
38 | powerpc*) | 42 | powerpc*) |
39 | FLOAT_H=float.h | 43 | GL_GENERATE_FLOAT_H=true |
40 | ;; | 44 | ;; |
41 | esac | 45 | esac |
42 | ;; | 46 | ;; |
43 | esac | 47 | esac |
44 | case "$host_os" in | 48 | case "$host_os" in |
45 | aix* | freebsd* | linux*) | 49 | aix* | freebsd* | dragonfly* | linux*) |
46 | if test -n "$FLOAT_H"; then | 50 | if $GL_GENERATE_FLOAT_H; then |
47 | REPLACE_FLOAT_LDBL=1 | 51 | REPLACE_FLOAT_LDBL=1 |
48 | fi | 52 | fi |
49 | ;; | 53 | ;; |
@@ -69,14 +73,20 @@ int main () | |||
69 | [gl_cv_func_itold_works=no], | 73 | [gl_cv_func_itold_works=no], |
70 | [case "$host" in | 74 | [case "$host" in |
71 | sparc*-*-linux*) | 75 | sparc*-*-linux*) |
72 | AC_EGREP_CPP([yes], | 76 | AC_COMPILE_IFELSE( |
73 | [#if defined __LP64__ || defined __arch64__ | 77 | [AC_LANG_SOURCE( |
74 | yes | 78 | [[#if defined __LP64__ || defined __arch64__ |
75 | #endif], | 79 | int ok; |
80 | #else | ||
81 | error fail | ||
82 | #endif | ||
83 | ]])], | ||
76 | [gl_cv_func_itold_works="guessing no"], | 84 | [gl_cv_func_itold_works="guessing no"], |
77 | [gl_cv_func_itold_works="guessing yes"]) | 85 | [gl_cv_func_itold_works="guessing yes"]) |
78 | ;; | 86 | ;; |
79 | *) gl_cv_func_itold_works="guessing yes" ;; | 87 | # Guess yes on native Windows. |
88 | mingw*) gl_cv_func_itold_works="guessing yes" ;; | ||
89 | *) gl_cv_func_itold_works="guessing yes" ;; | ||
80 | esac | 90 | esac |
81 | ]) | 91 | ]) |
82 | ]) | 92 | ]) |
@@ -85,14 +95,12 @@ int main () | |||
85 | REPLACE_ITOLD=1 | 95 | REPLACE_ITOLD=1 |
86 | dnl We add the workaround to <float.h> but also to <math.h>, | 96 | dnl We add the workaround to <float.h> but also to <math.h>, |
87 | dnl to increase the chances that the fix function gets pulled in. | 97 | dnl to increase the chances that the fix function gets pulled in. |
88 | FLOAT_H=float.h | 98 | GL_GENERATE_FLOAT_H=true |
89 | ;; | 99 | ;; |
90 | esac | 100 | esac |
91 | 101 | ||
92 | if test -n "$FLOAT_H"; then | 102 | if $GL_GENERATE_FLOAT_H; then |
93 | gl_NEXT_HEADERS([float.h]) | 103 | gl_NEXT_HEADERS([float.h]) |
94 | fi | 104 | fi |
95 | AC_SUBST([FLOAT_H]) | ||
96 | AM_CONDITIONAL([GL_GENERATE_FLOAT_H], [test -n "$FLOAT_H"]) | ||
97 | AC_SUBST([REPLACE_ITOLD]) | 105 | AC_SUBST([REPLACE_ITOLD]) |
98 | ]) | 106 | ]) |