Commit | Line | Data |
---|---|---|
231c0e0e | 1 | # float_h.m4 serial 7 |
49114fd4 | 2 | dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. |
c4b681fd LC |
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= | |
231c0e0e | 12 | REPLACE_FLOAT_LDBL=0 |
c4b681fd | 13 | case "$host_os" in |
231c0e0e | 14 | aix* | beos* | openbsd* | mirbsd* | irix*) |
c4b681fd | 15 | FLOAT_H=float.h |
231c0e0e LC |
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 | |
c4b681fd LC |
42 | ;; |
43 | esac | |
231c0e0e LC |
44 | if test -n "$FLOAT_H"; then |
45 | gl_NEXT_HEADERS([float.h]) | |
46 | fi | |
c4b681fd | 47 | AC_SUBST([FLOAT_H]) |
dd7d0148 | 48 | AM_CONDITIONAL([GL_GENERATE_FLOAT_H], [test -n "$FLOAT_H"]) |
c4b681fd | 49 | ]) |