summaryrefslogtreecommitdiffstats
path: root/gl/m4/float_h.m4
diff options
context:
space:
mode:
authorRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2022-08-23 19:42:51 +0200
committerRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2022-09-14 11:08:55 +0200
commit868beb15ae02c352005a2df8857f4ebb9bd758fd (patch)
tree0dc6e6a91c4ef0f131ca82a777e6ac2ad193c399 /gl/m4/float_h.m4
parentb89aee56964f7d933f2da5f371e32b4d7db9410b (diff)
downloadmonitoring-plugins-868beb1.tar.gz
Sync with the latest Gnulib code (d27c820595)
Diffstat (limited to 'gl/m4/float_h.m4')
-rw-r--r--gl/m4/float_h.m454
1 files changed, 31 insertions, 23 deletions
diff --git a/gl/m4/float_h.m4 b/gl/m4/float_h.m4
index 397f2d1f..0e845726 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
2dnl Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc. 2dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl 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
19changequote(,)dnl 19changequote(,)dnl
20 i[34567]86 ) 20 i[34567]86 )
21changequote([,])dnl 21changequote([,])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])