diff options
author | Fred Fish <fnf@specifix.com> | 1996-03-31 01:04:37 +0000 |
---|---|---|
committer | Fred Fish <fnf@specifix.com> | 1996-03-31 01:04:37 +0000 |
commit | 07b77f5ca4f7a43b63646c28d06e2261394cd78c (patch) | |
tree | e9b88d67f89b406ad16f44ad308af4d98ad6c9ba /gdb/configure | |
parent | 452ad97eb9e9a08f0e46a8608a2b7b1b5eaf5e18 (diff) | |
download | gdb-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')
-rwxr-xr-x | gdb/configure | 127 |
1 files changed, 82 insertions, 45 deletions
diff --git a/gdb/configure b/gdb/configure index 7cca5be..6ef555f 100755 --- a/gdb/configure +++ b/gdb/configure @@ -1283,7 +1283,7 @@ fi echo $ac_n "checking for gregset_t type""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'gdb_have_gregset_t'+set}'`\" = set"; then +if eval "test \"`echo '$''{'gdb_cv_have_gregset_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF @@ -1297,17 +1297,17 @@ gregset_t *gregsetp = 0 EOF if { (eval echo configure:1299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* - gdb_have_gregset_t=yes + gdb_cv_have_gregset_t=yes else rm -rf conftest* - gdb_have_gregset_t=no + gdb_cv_have_gregset_t=no fi rm -f conftest* fi -echo "$ac_t""$gdb_have_gregset_t" 1>&6 -if test $gdb_have_gregset_t = yes; then +echo "$ac_t""$gdb_cv_have_gregset_t" 1>&6 +if test $gdb_cv_have_gregset_t = yes; then cat >> confdefs.h <<\EOF #define HAVE_GREGSET_T 1 EOF @@ -1315,7 +1315,7 @@ EOF fi echo $ac_n "checking for fpregset_t type""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'gdb_have_fpregset_t'+set}'`\" = set"; then +if eval "test \"`echo '$''{'gdb_cv_have_fpregset_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF @@ -1329,17 +1329,17 @@ fpregset_t *fpregsetp = 0 EOF if { (eval echo configure:1331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* - gdb_have_fpregset_t=yes + gdb_cv_have_fpregset_t=yes else rm -rf conftest* - gdb_have_fpregset_t=no + gdb_cv_have_fpregset_t=no fi rm -f conftest* fi -echo "$ac_t""$gdb_have_fpregset_t" 1>&6 -if test $gdb_have_fpregset_t = yes; then +echo "$ac_t""$gdb_cv_have_fpregset_t" 1>&6 +if test $gdb_cv_have_fpregset_t = yes; then cat >> confdefs.h <<\EOF #define HAVE_FPREGSET_T 1 EOF @@ -1347,7 +1347,7 @@ EOF fi -echo $ac_n "checking for long double""... $ac_c" 1>&6 +echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1379,6 +1379,43 @@ EOF fi + +echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + gdb_cv_printf_has_long_double=no +else +cat > conftest.$ac_ext <<EOF +#line 1392 "configure" +#include "confdefs.h" + +int main () { + char buf[16]; + long double f = 3.141592653; + sprintf (buf, "%Lg", f); + return (strncmp ("3.14159", buf, 7)); +} +EOF +{ (eval echo configure:1402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } +if test -s conftest && (./conftest; exit) 2>/dev/null; then + gdb_cv_printf_has_long_double=yes +else + gdb_cv_printf_has_long_double=no +fi +fi +rm -fr conftest* +fi + +if test $gdb_cv_printf_has_long_double = yes; then + cat >> confdefs.h <<\EOF +#define PRINTF_HAS_LONG_DOUBLE 1 +EOF + +fi +echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6 + for ac_func in valloc getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 @@ -1386,7 +1423,7 @@ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1390 "configure" +#line 1427 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -1408,7 +1445,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:1412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1438,7 +1475,7 @@ else ac_cv_func_mmap=no else cat > conftest.$ac_ext <<EOF -#line 1442 "configure" +#line 1479 "configure" #include "confdefs.h" /* Thanks to Mike Haertel and Jim Avera for this test. */ @@ -1507,7 +1544,7 @@ main() } EOF -{ (eval echo configure:1511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:1548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then ac_cv_func_mmap=yes else @@ -1675,12 +1712,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext <<EOF -#line 1679 "configure" +#line 1716 "configure" #include "confdefs.h" #include <$x_direct_test_include> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1721: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1747,7 +1784,7 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <<EOF -#line 1751 "configure" +#line 1788 "configure" #include "confdefs.h" int main() { return 0; } @@ -1755,7 +1792,7 @@ int t() { ${x_direct_test_function}() ; return 0; } EOF -if { (eval echo configure:1759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -1876,7 +1913,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lICE $LIBS" cat > conftest.$ac_ext <<EOF -#line 1880 "configure" +#line 1917 "configure" #include "confdefs.h" int main() { return 0; } @@ -1884,7 +1921,7 @@ int t() { IceConnectionNumber() ; return 0; } EOF -if { (eval echo configure:1888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1920,7 +1957,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <<EOF -#line 1924 "configure" +#line 1961 "configure" #include "confdefs.h" int main() { return 0; } @@ -1928,7 +1965,7 @@ int t() { dnet_ntoa() ; return 0; } EOF -if { (eval echo configure:1932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1955,7 +1992,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <<EOF -#line 1959 "configure" +#line 1996 "configure" #include "confdefs.h" int main() { return 0; } @@ -1963,7 +2000,7 @@ int t() { dnet_ntoa() ; return 0; } EOF -if { (eval echo configure:1967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1995,7 +2032,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <<EOF -#line 1999 "configure" +#line 2036 "configure" #include "confdefs.h" int main() { return 0; } @@ -2003,7 +2040,7 @@ int t() { t_accept() ; return 0; } EOF -if { (eval echo configure:2007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2034,7 +2071,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <<EOF -#line 2038 "configure" +#line 2075 "configure" #include "confdefs.h" int main() { return 0; } @@ -2042,7 +2079,7 @@ int t() { socket() ; return 0; } EOF -if { (eval echo configure:2046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2139,12 +2176,12 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2143 "configure" +#line 2180 "configure" #include "confdefs.h" #include <tclInt.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2148: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2197,7 +2234,7 @@ if test "$cross_compiling" = yes; then else cat > conftest.$ac_ext <<EOF -#line 2201 "configure" +#line 2238 "configure" #include "confdefs.h" #include <stdio.h> @@ -2212,7 +2249,7 @@ main() { return 0; } EOF -{ (eval echo configure:2216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:2253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then tclmajor=`cat tclmajor` tclminor=`cat tclminor` @@ -2357,13 +2394,13 @@ else ac_cv_c_tclib="-l$installedtcllibroot" else cat > conftest.$ac_ext <<EOF -#line 2361 "configure" +#line 2398 "configure" #include "confdefs.h" Tcl_AppInit() { exit(0); } EOF -{ (eval echo configure:2367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:2404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then ac_cv_c_tcllib="-l$installedtcllibroot" else @@ -2473,12 +2510,12 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2477 "configure" +#line 2514 "configure" #include "confdefs.h" #include <tk.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2482: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2538,7 +2575,7 @@ if test "$cross_compiling" = yes; then else cat > conftest.$ac_ext <<EOF -#line 2542 "configure" +#line 2579 "configure" #include "confdefs.h" #include <stdio.h> @@ -2553,7 +2590,7 @@ cat > conftest.$ac_ext <<EOF return 0; } EOF -{ (eval echo configure:2557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:2594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then tkmajor=`cat tkmajor` tkminor=`cat tkminor` @@ -2719,13 +2756,13 @@ else ac_cv_c_tklib="-l$installedtklibroot" else cat > conftest.$ac_ext <<EOF -#line 2723 "configure" +#line 2760 "configure" #include "confdefs.h" Tcl_AppInit() { exit(0); } EOF -{ (eval echo configure:2729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:2766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then ac_cv_c_tklib="-l$installedtklibroot" else @@ -2766,7 +2803,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <<EOF -#line 2770 "configure" +#line 2807 "configure" #include "confdefs.h" int main() { return 0; } @@ -2774,7 +2811,7 @@ int t() { main() ; return 0; } EOF -if { (eval echo configure:2778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2804,7 +2841,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <<EOF -#line 2808 "configure" +#line 2845 "configure" #include "confdefs.h" int main() { return 0; } @@ -2812,7 +2849,7 @@ int t() { main() ; return 0; } EOF -if { (eval echo configure:2816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else |