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
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
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
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
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
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
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. */
; 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
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. */
}
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
# 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*
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; }
${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.
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; }
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
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; }
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
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; }
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
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; }
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
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; }
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
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*
else
cat > conftest.$ac_ext <<EOF
-#line 2201 "configure"
+#line 2238 "configure"
#include "confdefs.h"
#include <stdio.h>
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`
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
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*
else
cat > conftest.$ac_ext <<EOF
-#line 2542 "configure"
+#line 2579 "configure"
#include "confdefs.h"
#include <stdio.h>
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`
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
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; }
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
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; }
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
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
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)])
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.