X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=libdecnumber%2Fconfigure.ac;h=4d9060f5cd54eb4ae5a1ebfa63f3052bdf4b9bac;hp=956ff8d2028234b13a49c04ae2f7b3f7d52cc6b6;hb=7a1a4065faf220bd5ff12fcdf4a42cc6a7259688;hpb=56c15991b10cbf3411186734460e0a5c19805dec diff --git a/libdecnumber/configure.ac b/libdecnumber/configure.ac index 956ff8d2028..4d9060f5cd5 100644 --- a/libdecnumber/configure.ac +++ b/libdecnumber/configure.ac @@ -1,13 +1,13 @@ # configure.ac for libdecnumber -*- Autoconf -*- # Process this file with autoconf to generate a configuration script. -# Copyright 2005, 2006 Free Software Foundation, Inc. +# Copyright 2005, 2006, 2009 Free Software Foundation, Inc. # This file is part of GCC. # GCC is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free -# Software Foundation; either version 2, or (at your option) any +# Software Foundation; either version 3, or (at your option) any # later #version. # GCC is distributed in the hope that it will be useful, but WITHOUT @@ -16,11 +16,10 @@ # License #for more details. # You should have received a copy of the GNU General Public License -# along with GCC; see the file COPYING. If not, write to the Free -# Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with GCC; see the file COPYING3. If not see +# . -AC_PREREQ(2.59) +AC_PREREQ(2.64) AC_INIT(libdecnumber, [ ], gcc-bugs@gcc.gnu.org, libdecnumber) AC_CONFIG_SRCDIR(decNumber.h) AC_CONFIG_MACRO_DIR(../config) @@ -40,7 +39,7 @@ AC_CHECK_PROGS([AUTOHEADER], [autoheader], [$MISSING autoheader]) ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wwrite-strings -Wstrict-prototypes \ -Wmissing-prototypes -Wold-style-definition \ - -Wmissing-format-attribute]) + -Wmissing-format-attribute -Wcast-qual]) ACX_PROG_CC_WARNING_ALMOST_PEDANTIC([-Wno-long-long]) # Only enable with --enable-werror-always until existing warnings are @@ -71,6 +70,61 @@ else fi AC_SUBST(MAINT) +AC_CANONICAL_TARGET + +# Default decimal format +# If you change the defaults here, be sure to change them in the GCC directory also +AC_MSG_CHECKING([for decimal floating point]) +AC_ARG_ENABLE(decimal-float, +[ --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], +[ + 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 + ;; + *) + enable_decimal_float=no + ;; + esac +]) + +# x86's use BID format instead of DPD +# In theory --enable-decimal-float=no should not compile anything +# For the sake of simplicity, just use the default format in this directory +if test x$enable_decimal_float = xyes -o x$enable_decimal_float = xno; then + case $target in + i?86*-*-linux* | x86_64*-*-linux*) + enable_decimal_float=bid + ;; + *) + enable_decimal_float=dpd + ;; + esac +fi + +# If BID is being used, additional objects should be linked in. +if test x$enable_decimal_float = xbid; then + ADDITIONAL_OBJS="$ADDITIONAL_OBJS \$(bid_OBJS)" +else + ADDITIONAL_OBJS= +fi + +AC_MSG_RESULT($enable_decimal_float) +AC_SUBST(enable_decimal_float) +AC_SUBST(ADDITIONAL_OBJS) + +AC_C_BIGENDIAN + # Output. AC_CONFIG_HEADERS(config.h:config.in, [echo timestamp > stamp-h1])