]>
Commit | Line | Data |
---|---|---|
23340821 | 1 | dnl @synopsis GCC_AC_ENABLE_DECIMAL_FLOAT([target triplet]) |
2 | dnl | |
3 | dnl Enable C extension for decimal float if target supports it. | |
4 | dnl | |
5 | dnl @author Andreas Krebbel <Andreas.Krebbel@de.ibm.com> | |
6 | ||
7 | AC_DEFUN([GCC_AC_ENABLE_DECIMAL_FLOAT], | |
8 | [ | |
9 | AC_ARG_ENABLE(decimal-float, | |
10 | [ --enable-decimal-float={no,yes,bid,dpd} | |
11 | enable decimal float extension to C. Selecting 'bid' | |
12 | or 'dpd' choses which decimal floating point format | |
13 | to use], | |
14 | [ | |
15 | case $enable_decimal_float in | |
a87eb011 | 16 | yes | no | bid | dpd) default_decimal_float=$enable_decimal_float ;; |
23340821 | 17 | *) AC_MSG_ERROR(['$enable_decimal_float' is an invalid value for --enable-decimal-float. |
18 | Valid choices are 'yes', 'bid', 'dpd', and 'no'.]) ;; | |
19 | esac | |
20 | ], | |
21 | [ | |
22 | case $1 in | |
19aace05 | 23 | powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* | s390*-*-linux* | \ |
90503e19 | 24 | i?86*-*-elfiamcu | i?86*-*-gnu* | x86_64*-*-gnu* \ |
19aace05 | 25 | i?86*-*-mingw* | x86_64*-*-mingw* | \ |
b0b82c40 | 26 | i?86*-*-cygwin* | x86_64*-*-cygwin*) |
23340821 | 27 | enable_decimal_float=yes |
28 | ;; | |
29 | *) | |
e6425baf | 30 | AC_MSG_WARN([decimal float is not supported for this target, ignored]) |
23340821 | 31 | enable_decimal_float=no |
32 | ;; | |
33 | esac | |
34 | ]) | |
35 | ||
36 | # x86's use BID format instead of DPD | |
37 | case x$enable_decimal_float in | |
38 | xyes) | |
39 | case $1 in | |
40 | i?86*-*-* | x86_64*-*-*) | |
41 | enable_decimal_float=bid | |
42 | ;; | |
43 | *) | |
44 | enable_decimal_float=dpd | |
45 | ;; | |
46 | esac | |
a87eb011 | 47 | default_decimal_float=$enable_decimal_float |
23340821 | 48 | ;; |
49 | xno) | |
50 | # ENABLE_DECIMAL_FLOAT is set to 0. But we have to have proper | |
51 | # dependency on libdecnumber. | |
a87eb011 | 52 | default_decimal_float=dpd |
23340821 | 53 | ;; |
54 | esac | |
55 | AC_SUBST(enable_decimal_float) | |
56 | ||
a87eb011 | 57 | ]) |