aboutsummaryrefslogtreecommitdiff
path: root/gdb/configure.in
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>1996-03-31 01:04:37 +0000
committerFred Fish <fnf@specifix.com>1996-03-31 01:04:37 +0000
commit07b77f5ca4f7a43b63646c28d06e2261394cd78c (patch)
treee9b88d67f89b406ad16f44ad308af4d98ad6c9ba /gdb/configure.in
parent452ad97eb9e9a08f0e46a8608a2b7b1b5eaf5e18 (diff)
downloadgdb-07b77f5ca4f7a43b63646c28d06e2261394cd78c.zip
gdb-07b77f5ca4f7a43b63646c28d06e2261394cd78c.tar.gz
gdb-07b77f5ca4f7a43b63646c28d06e2261394cd78c.tar.bz2
* configure.in: Check whether printf family supports printing
long doubles or not and define PRINTF_HAS_LONG_DOUBLE if so. * acconfig.h: Provide default undef for PRINTF_HAS_LONG_DOUBLE. * configure: Regenerate. * valprint.c (print_floating): Use PRINTF_HAS_LONG_DOUBLE. * c-exp.y (parse_number): Use PRINTF_HAS_LONG_DOUBLE. * configure.in: Fix have_gregset and have_fpregset autoconf variable names so that they match the pattern required to cache them.
Diffstat (limited to 'gdb/configure.in')
-rw-r--r--gdb/configure.in37
1 files changed, 28 insertions, 9 deletions
diff --git a/gdb/configure.in b/gdb/configure.in
index f67b3aa..a4c50f1 100644
--- a/gdb/configure.in
+++ b/gdb/configure.in
@@ -41,20 +41,20 @@ AC_CHECK_HEADERS(limits.h memory.h string.h strings.h unistd.h termios.h termio.
AC_HEADER_STAT
AC_MSG_CHECKING([for gregset_t type])
-AC_CACHE_VAL(gdb_have_gregset_t,
+AC_CACHE_VAL(gdb_cv_have_gregset_t,
[AC_TRY_LINK([#include <sys/procfs.h>],[gregset_t *gregsetp = 0],
-gdb_have_gregset_t=yes, gdb_have_gregset_t=no)])
-AC_MSG_RESULT($gdb_have_gregset_t)
-if test $gdb_have_gregset_t = yes; then
+gdb_cv_have_gregset_t=yes, gdb_cv_have_gregset_t=no)])
+AC_MSG_RESULT($gdb_cv_have_gregset_t)
+if test $gdb_cv_have_gregset_t = yes; then
AC_DEFINE(HAVE_GREGSET_T)
fi
AC_MSG_CHECKING([for fpregset_t type])
-AC_CACHE_VAL(gdb_have_fpregset_t,
+AC_CACHE_VAL(gdb_cv_have_fpregset_t,
[AC_TRY_LINK([#include <sys/procfs.h>],[fpregset_t *fpregsetp = 0],
-gdb_have_fpregset_t=yes, gdb_have_fpregset_t=no)])
-AC_MSG_RESULT($gdb_have_fpregset_t)
-if test $gdb_have_fpregset_t = yes; then
+gdb_cv_have_fpregset_t=yes, gdb_cv_have_fpregset_t=no)])
+AC_MSG_RESULT($gdb_cv_have_fpregset_t)
+if test $gdb_cv_have_fpregset_t = yes; then
AC_DEFINE(HAVE_FPREGSET_T)
fi
@@ -62,7 +62,7 @@ dnl See if compiler supports "long double" type. Can't use AC_C_LONG_DOUBLE
dnl because autoconf complains about cross-compilation issues. However, this
dnl code uses the same variables as the macro for compatibility.
-AC_MSG_CHECKING(for long double)
+AC_MSG_CHECKING(for long double support in compiler)
AC_CACHE_VAL(ac_cv_c_long_double,
[AC_TRY_COMPILE(, [long double foo;],
ac_cv_c_long_double=yes, ac_cv_c_long_double=no)])
@@ -71,6 +71,25 @@ if test $ac_cv_c_long_double = yes; then
AC_DEFINE(HAVE_LONG_DOUBLE)
fi
+dnl See if the compiler and runtime support printing long doubles
+
+AC_MSG_CHECKING(for long double support in printf)
+AC_CACHE_VAL(gdb_cv_printf_has_long_double,
+[AC_TRY_RUN([
+int main () {
+ char buf[16];
+ long double f = 3.141592653;
+ sprintf (buf, "%Lg", f);
+ return (strncmp ("3.14159", buf, 7));
+}],
+gdb_cv_printf_has_long_double=yes,
+gdb_cv_printf_has_long_double=no,
+gdb_cv_printf_has_long_double=no)])
+if test $gdb_cv_printf_has_long_double = yes; then
+ AC_DEFINE(PRINTF_HAS_LONG_DOUBLE)
+fi
+AC_MSG_RESULT($gdb_cv_printf_has_long_double)
+
AC_FUNC_MMAP
dnl Handle optional features that can be enabled.