Sync toplevel files with GCC tree
[deliverable/binutils-gdb.git] / config / dfp.m4
CommitLineData
0b51ce00
AK
1dnl @synopsis GCC_AC_ENABLE_DECIMAL_FLOAT([target triplet])
2dnl
3dnl Enable C extension for decimal float if target supports it.
4dnl
5dnl @author Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
6
7AC_DEFUN([GCC_AC_ENABLE_DECIMAL_FLOAT],
8[
9AC_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
bbb3c81a 16 yes | no | bid | dpd) default_decimal_float=$enable_decimal_float ;;
0b51ce00
AK
17 *) AC_MSG_ERROR(['$enable_decimal_float' is an invalid value for --enable-decimal-float.
18Valid choices are 'yes', 'bid', 'dpd', and 'no'.]) ;;
19 esac
20],
21[
22 case $1 in
29821356
RW
23 powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* | s390*-*-linux* | \
24 i?86*-*-mingw* | x86_64*-*-mingw* | \
25 i?86*-*-cygwin*)
0b51ce00
AK
26 enable_decimal_float=yes
27 ;;
28 *)
bbb3c81a 29 AC_MSG_WARN([decimal float is not supported for this target, ignored])
0b51ce00
AK
30 enable_decimal_float=no
31 ;;
32 esac
33])
34
35# x86's use BID format instead of DPD
36case x$enable_decimal_float in
37 xyes)
38 case $1 in
39 i?86*-*-* | x86_64*-*-*)
40 enable_decimal_float=bid
41 ;;
42 *)
43 enable_decimal_float=dpd
44 ;;
45 esac
bbb3c81a 46 default_decimal_float=$enable_decimal_float
0b51ce00
AK
47 ;;
48 xno)
49 # ENABLE_DECIMAL_FLOAT is set to 0. But we have to have proper
50 # dependency on libdecnumber.
bbb3c81a 51 default_decimal_float=dpd
0b51ce00
AK
52 ;;
53esac
54AC_SUBST(enable_decimal_float)
55
bbb3c81a 56])
This page took 0.092942 seconds and 4 git commands to generate.