OSDN Git Service

2010-09-30 Tobias Burnus <burnus@net-b.de>
[pf3gnuchains/gcc-fork.git] / libdecnumber / configure.ac
index 206374d..87820bf 100644 (file)
@@ -1,7 +1,25 @@
-#                                               -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
+# configure.ac for libdecnumber                        -*- Autoconf -*-
+# Process this file with autoconf to generate a configuration script.
 
-AC_PREREQ(2.59)
+# 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 3, or (at your option) any
+# later #version.
+
+# GCC is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+# License #for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3.  If not see
+# <http://www.gnu.org/licenses/>.
+
+AC_PREREQ(2.64)
 AC_INIT(libdecnumber, [ ], gcc-bugs@gcc.gnu.org, libdecnumber)
 AC_CONFIG_SRCDIR(decNumber.h)
 AC_CONFIG_MACRO_DIR(../config)
@@ -21,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
@@ -30,6 +48,7 @@ ACX_PROG_CC_WARNINGS_ARE_ERRORS([manual])
 
 # Checks for header files.
 AC_CHECK_HEADERS(ctype.h stddef.h string.h stdio.h)
+GCC_HEADER_STDINT(gstdint.h)
 
 # Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
@@ -51,6 +70,30 @@ 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])
+
+GCC_AC_ENABLE_DECIMAL_FLOAT([$target])
+
+# Use default_decimal_float for dependency.
+enable_decimal_float=$default_decimal_float
+
+# 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])