2 dnl Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
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.
9 AC_REQUIRE([AC_PROG_CC])
10 AC_REQUIRE([AC_CANONICAL_HOST])
14 aix* | beos* | openbsd* | mirbsd* | irix*)
17 freebsd* | dragonfly*)
25 # On x86_64 systems, the C compiler may still be generating
29 [[#if defined __LP64__ || defined __x86_64__ || defined __amd64__
49 aix* | freebsd* | dragonfly* | linux*)
50 if test -n "$FLOAT_H"; then
56 dnl Test against glibc-2.7 Linux/SPARC64 bug.
58 AC_CACHE_CHECK([whether conversion from 'int' to 'long double' works],
59 [gl_cv_func_itold_works],
64 volatile long double ld;
72 [gl_cv_func_itold_works=yes],
73 [gl_cv_func_itold_works=no],
78 [[#if defined __LP64__ || defined __arch64__
84 [gl_cv_func_itold_works="guessing no"],
85 [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" ;;
93 case "$gl_cv_func_itold_works" in
96 dnl We add the workaround to <float.h> but also to <math.h>,
97 dnl to increase the chances that the fix function gets pulled in.
102 if test -n "$FLOAT_H"; then
103 gl_NEXT_HEADERS([float.h])
106 AM_CONDITIONAL([GL_GENERATE_FLOAT_H], [test -n "$FLOAT_H"])
107 AC_SUBST([REPLACE_ITOLD])