summaryrefslogtreecommitdiff
path: root/gcc/configure.ac
diff options
context:
space:
mode:
authormeissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4>2007-03-24 17:04:47 +0000
committermeissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4>2007-03-24 17:04:47 +0000
commit10de71e103272ab95d389659e312b95e6b86a65c (patch)
treeec50c8ab7786788a6da7d4f06b0cd93e9555d487 /gcc/configure.ac
parent99ad623febd84d2a9cf4c2d0ad950c48c650a624 (diff)
downloadgcc-10de71e103272ab95d389659e312b95e6b86a65c.tar.gz
Add BID decimal support
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123185 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r--gcc/configure.ac51
1 files changed, 41 insertions, 10 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac
index f3a62363b6e..226b62a0d48 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -667,27 +667,58 @@ AC_ARG_ENABLE(__cxa_atexit,
# Enable C extension for decimal float if target supports it.
AC_ARG_ENABLE(decimal-float,
-[ --enable-decimal-float enable decimal float extension to C],
+[ --enable-decimal-float={no,yes,bid,dpd}
+ enable decimal float extension to C. Selecting 'bid'
+ or 'dpd' choses which decimal floating point format
+ to use],
[
- if test x$enablevar = xyes ; then
- case $target in
- powerpc*-*-linux* | i?86*-*-linux*)
+ case $enable_decimal_float in
+ yes | no | bid | dpd) ;;
+ *) AC_MSG_ERROR(['$enable_decimal_float' is an invalid value for --enable-decimal-float.
+Valid choices are 'yes', 'bid', 'dpd', and 'no'.]) ;;
+ esac
+],
+[
+ case $target in
+ powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux*)
enable_decimal_float=yes
;;
*)
AC_MSG_WARN(decimal float is not supported for this target, ignored)
enable_decimal_float=no
;;
- esac
- fi
-], [enable_decimal_float=no])
-
-AC_SUBST(enable_decimal_float)
+ esac
+])
-dfp=`if test $enable_decimal_float = yes; then echo 1; else echo 0; fi`
+dfp=`if test $enable_decimal_float != no; then echo 1; else echo 0; fi`
AC_DEFINE_UNQUOTED(ENABLE_DECIMAL_FLOAT, $dfp,
[Define to 1 to enable decimal float extension to C.])
+# x86's use BID format instead of DPD
+case x$enable_decimal_float in
+ xyes)
+ case $target in
+ i?86*-*-linux* | x86_64*-*-linux*)
+ enable_decimal_float=bid
+ ;;
+ *)
+ enable_decimal_float=dpd
+ ;;
+ esac
+ ;;
+ xno)
+ # ENABLE_DECIMAL_FLOAT is set to 0. But we have to have proper
+ # dependency on libdecnumber.
+ enable_decimal_float=dpd
+ ;;
+esac
+AC_SUBST(enable_decimal_float)
+
+bid=`if test $enable_decimal_float = bid; then echo 1; else echo 0; fi`
+AC_DEFINE_UNQUOTED(ENABLE_DECIMAL_BID_FORMAT, $bid,
+[Define to 1 to specify that we are using the BID decimal floating
+point format instead of DPD])
+
# Enable threads
# Pass with no value to take the default
# Pass with a value to specify a thread package