* build-aux/bootstrap (slurp): Remove obsolescent gettext.m4 patch.
[gnulib.git] / m4 / float_h.m4
1 # float_h.m4 serial 7
2 dnl Copyright (C) 2007, 2009-2011 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.
6
7 AC_DEFUN([gl_FLOAT_H],
8 [
9   AC_REQUIRE([AC_PROG_CC])
10   AC_REQUIRE([AC_CANONICAL_HOST])
11   FLOAT_H=
12   REPLACE_FLOAT_LDBL=0
13   case "$host_os" in
14     aix* | beos* | openbsd* | mirbsd* | irix*)
15       FLOAT_H=float.h
16       ;;
17     freebsd*)
18       case "$host_cpu" in
19 changequote(,)dnl
20         i[34567]86 )
21 changequote([,])dnl
22           FLOAT_H=float.h
23           ;;
24         x86_64 )
25           # On x86_64 systems, the C compiler may still be generating
26           # 32-bit code.
27           AC_EGREP_CPP([yes],
28             [#if defined __LP64__ || defined __x86_64__ || defined __amd64__
29              yes
30              #endif],
31             [],
32             [FLOAT_H=float.h])
33           ;;
34       esac
35       ;;
36   esac
37   case "$host_os" in
38     aix* | freebsd*)
39       if test -n "$FLOAT_H"; then
40         REPLACE_FLOAT_LDBL=1
41       fi
42       ;;
43   esac
44   if test -n "$FLOAT_H"; then
45     gl_NEXT_HEADERS([float.h])
46   fi
47   AC_SUBST([FLOAT_H])
48   AM_CONDITIONAL([GL_GENERATE_FLOAT_H], [test -n "$FLOAT_H"])
49 ])