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.m429
1 files changed, 15 insertions, 14 deletions
diff --git a/gl/m4/floorf.m4 b/gl/m4/floorf.m4
index c49ffa6..2572c84 100644
--- a/gl/m4/floorf.m4
+++ b/gl/m4/floorf.m4
@@ -1,5 +1,6 @@
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-2024 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.
@@ -26,7 +27,7 @@ AC_DEFUN([gl_FUNC_FLOORF],
26 AC_CACHE_CHECK([whether floorf works according to ISO C 99 with IEC 60559], 27 AC_CACHE_CHECK([whether floorf works according to ISO C 99 with IEC 60559],
27 [gl_cv_func_floorf_ieee], 28 [gl_cv_func_floorf_ieee],
28 [ 29 [
29 save_LIBS="$LIBS" 30 saved_LIBS="$LIBS"
30 LIBS="$LIBS $FLOORF_LIBM" 31 LIBS="$LIBS $FLOORF_LIBM"
31 AC_RUN_IFELSE( 32 AC_RUN_IFELSE(
32 [AC_LANG_SOURCE([[ 33 [AC_LANG_SOURCE([[
@@ -49,17 +50,17 @@ int main (int argc, char *argv[])
49 [gl_cv_func_floorf_ieee=yes], 50 [gl_cv_func_floorf_ieee=yes],
50 [gl_cv_func_floorf_ieee=no], 51 [gl_cv_func_floorf_ieee=no],
51 [case "$host_os" in 52 [case "$host_os" in
52 # Guess yes on glibc systems. 53 # Guess yes on glibc systems.
53 *-gnu* | gnu*) gl_cv_func_floorf_ieee="guessing yes" ;; 54 *-gnu* | gnu*) gl_cv_func_floorf_ieee="guessing yes" ;;
54 # Guess yes on musl systems. 55 # Guess yes on musl systems.
55 *-musl*) gl_cv_func_floorf_ieee="guessing yes" ;; 56 *-musl* | midipix*) gl_cv_func_floorf_ieee="guessing yes" ;;
56 # Guess yes on native Windows. 57 # Guess yes on native Windows.
57 mingw*) gl_cv_func_floorf_ieee="guessing yes" ;; 58 mingw* | windows*) gl_cv_func_floorf_ieee="guessing yes" ;;
58 # If we don't know, obey --enable-cross-guesses. 59 # If we don't know, obey --enable-cross-guesses.
59 *) gl_cv_func_floorf_ieee="$gl_cross_guess_normal" ;; 60 *) gl_cv_func_floorf_ieee="$gl_cross_guess_normal" ;;
60 esac 61 esac
61 ]) 62 ])
62 LIBS="$save_LIBS" 63 LIBS="$saved_LIBS"
63 ]) 64 ])
64 case "$gl_cv_func_floorf_ieee" in 65 case "$gl_cv_func_floorf_ieee" in
65 *yes) ;; 66 *yes) ;;
@@ -94,7 +95,7 @@ AC_DEFUN([gl_FUNC_FLOORF_LIBS],
94 [[x = funcptr(x) + floorf(x);]])], 95 [[x = funcptr(x) + floorf(x);]])],
95 [gl_cv_func_floorf_libm=]) 96 [gl_cv_func_floorf_libm=])
96 if test "$gl_cv_func_floorf_libm" = "?"; then 97 if test "$gl_cv_func_floorf_libm" = "?"; then
97 save_LIBS="$LIBS" 98 saved_LIBS="$LIBS"
98 LIBS="$LIBS -lm" 99 LIBS="$LIBS -lm"
99 AC_LINK_IFELSE( 100 AC_LINK_IFELSE(
100 [AC_LANG_PROGRAM( 101 [AC_LANG_PROGRAM(
@@ -106,7 +107,7 @@ AC_DEFUN([gl_FUNC_FLOORF_LIBS],
106 float x;]], 107 float x;]],
107 [[x = funcptr(x) + floorf(x);]])], 108 [[x = funcptr(x) + floorf(x);]])],
108 [gl_cv_func_floorf_libm="-lm"]) 109 [gl_cv_func_floorf_libm="-lm"])
109 LIBS="$save_LIBS" 110 LIBS="$saved_LIBS"
110 fi 111 fi
111 ]) 112 ])
112 FLOORF_LIBM="$gl_cv_func_floorf_libm" 113 FLOORF_LIBM="$gl_cv_func_floorf_libm"