summaryrefslogtreecommitdiffstats
path: root/gl/m4/floorf.m4
diff options
context:
space:
mode:
Diffstat (limited to 'gl/m4/floorf.m4')
-rw-r--r--gl/m4/floorf.m430
1 files changed, 16 insertions, 14 deletions
diff --git a/gl/m4/floorf.m4 b/gl/m4/floorf.m4
index c49ffa6b..cb75fce9 100644
--- a/gl/m4/floorf.m4
+++ b/gl/m4/floorf.m4
@@ -1,8 +1,10 @@
1# floorf.m4 serial 18 1# floorf.m4
2dnl Copyright (C) 2007, 2009-2023 Free Software Foundation, Inc. 2# serial 21
3dnl Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 6dnl with or without modifications, as long as this notice is preserved.
7dnl This file is offered as-is, without any warranty.
6 8
7AC_DEFUN([gl_FUNC_FLOORF], 9AC_DEFUN([gl_FUNC_FLOORF],
8[ 10[
@@ -26,7 +28,7 @@ AC_DEFUN([gl_FUNC_FLOORF],
26 AC_CACHE_CHECK([whether floorf works according to ISO C 99 with IEC 60559], 28 AC_CACHE_CHECK([whether floorf works according to ISO C 99 with IEC 60559],
27 [gl_cv_func_floorf_ieee], 29 [gl_cv_func_floorf_ieee],
28 [ 30 [
29 save_LIBS="$LIBS" 31 saved_LIBS="$LIBS"
30 LIBS="$LIBS $FLOORF_LIBM" 32 LIBS="$LIBS $FLOORF_LIBM"
31 AC_RUN_IFELSE( 33 AC_RUN_IFELSE(
32 [AC_LANG_SOURCE([[ 34 [AC_LANG_SOURCE([[
@@ -49,17 +51,17 @@ int main (int argc, char *argv[])
49 [gl_cv_func_floorf_ieee=yes], 51 [gl_cv_func_floorf_ieee=yes],
50 [gl_cv_func_floorf_ieee=no], 52 [gl_cv_func_floorf_ieee=no],
51 [case "$host_os" in 53 [case "$host_os" in
52 # Guess yes on glibc systems. 54 # Guess yes on glibc systems.
53 *-gnu* | gnu*) gl_cv_func_floorf_ieee="guessing yes" ;; 55 *-gnu* | gnu*) gl_cv_func_floorf_ieee="guessing yes" ;;
54 # Guess yes on musl systems. 56 # Guess yes on musl systems.
55 *-musl*) gl_cv_func_floorf_ieee="guessing yes" ;; 57 *-musl* | midipix*) gl_cv_func_floorf_ieee="guessing yes" ;;
56 # Guess yes on native Windows. 58 # Guess yes on native Windows.
57 mingw*) gl_cv_func_floorf_ieee="guessing yes" ;; 59 mingw* | windows*) gl_cv_func_floorf_ieee="guessing yes" ;;
58 # If we don't know, obey --enable-cross-guesses. 60 # If we don't know, obey --enable-cross-guesses.
59 *) gl_cv_func_floorf_ieee="$gl_cross_guess_normal" ;; 61 *) gl_cv_func_floorf_ieee="$gl_cross_guess_normal" ;;
60 esac 62 esac
61 ]) 63 ])
62 LIBS="$save_LIBS" 64 LIBS="$saved_LIBS"
63 ]) 65 ])
64 case "$gl_cv_func_floorf_ieee" in 66 case "$gl_cv_func_floorf_ieee" in
65 *yes) ;; 67 *yes) ;;
@@ -94,7 +96,7 @@ AC_DEFUN([gl_FUNC_FLOORF_LIBS],
94 [[x = funcptr(x) + floorf(x);]])], 96 [[x = funcptr(x) + floorf(x);]])],
95 [gl_cv_func_floorf_libm=]) 97 [gl_cv_func_floorf_libm=])
96 if test "$gl_cv_func_floorf_libm" = "?"; then 98 if test "$gl_cv_func_floorf_libm" = "?"; then
97 save_LIBS="$LIBS" 99 saved_LIBS="$LIBS"
98 LIBS="$LIBS -lm" 100 LIBS="$LIBS -lm"
99 AC_LINK_IFELSE( 101 AC_LINK_IFELSE(
100 [AC_LANG_PROGRAM( 102 [AC_LANG_PROGRAM(
@@ -106,7 +108,7 @@ AC_DEFUN([gl_FUNC_FLOORF_LIBS],
106 float x;]], 108 float x;]],
107 [[x = funcptr(x) + floorf(x);]])], 109 [[x = funcptr(x) + floorf(x);]])],
108 [gl_cv_func_floorf_libm="-lm"]) 110 [gl_cv_func_floorf_libm="-lm"])
109 LIBS="$save_LIBS" 111 LIBS="$saved_LIBS"
110 fi 112 fi
111 ]) 113 ])
112 FLOORF_LIBM="$gl_cv_func_floorf_libm" 114 FLOORF_LIBM="$gl_cv_func_floorf_libm"