2 dnl Copyright (C) 2007, 2009-2013 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*)
25 # On x86_64 systems, the C compiler may still be generating
28 [#if defined __LP64__ || defined __x86_64__ || defined __amd64__
45 aix* | freebsd* | linux*)
46 if test -n "$FLOAT_H"; then
52 dnl Test against glibc-2.7 Linux/SPARC64 bug.
54 AC_CACHE_CHECK([whether conversion from 'int' to 'long double' works],
55 [gl_cv_func_itold_works],
60 volatile long double ld;
68 [gl_cv_func_itold_works=yes],
69 [gl_cv_func_itold_works=no],
73 [#if defined __LP64__ || defined __arch64__
76 [gl_cv_func_itold_works="guessing no"],
77 [gl_cv_func_itold_works="guessing yes"])
79 *) gl_cv_func_itold_works="guessing yes" ;;
83 case "$gl_cv_func_itold_works" in
86 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.
92 if test -n "$FLOAT_H"; then
93 gl_NEXT_HEADERS([float.h])
96 AM_CONDITIONAL([GL_GENERATE_FLOAT_H], [test -n "$FLOAT_H"])
97 AC_SUBST([REPLACE_ITOLD])