# Checks for library functions. #
# ------------------------------ #
-for ac_func in btowc canonicalize_file_name isascii poll \
- realpath sbrk setpgid setpgrp sigaction sigprocmask sigsetmask
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4992: checking for $ac_func" >&5
-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 4997 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:5020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:5047: checking for working alloca.h" >&5
+echo "configure:4991: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5052 "configure"
+#line 4996 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:5059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:5080: checking for alloca" >&5
+echo "configure:5024: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5085 "configure"
+#line 5029 "configure"
#include "confdefs.h"
#ifdef __GNUC__
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:5113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:5145: checking whether alloca needs Cray hooks" >&5
+echo "configure:5089: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5150 "configure"
+#line 5094 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5175: checking for $ac_func" >&5
+echo "configure:5119: checking for $ac_func" >&5
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 5180 "configure"
+#line 5124 "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:5203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:5230: checking stack direction for C alloca" >&5
+echo "configure:5174: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 5238 "configure"
+#line 5182 "configure"
#include "confdefs.h"
find_stack_direction ()
{
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:5257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
fi
-echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:5279: checking for pid_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5284 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
- ac_cv_type_pid_t=yes
-else
- rm -rf conftest*
- ac_cv_type_pid_t=no
-fi
-rm -f conftest*
-
-fi
-echo "$ac_t""$ac_cv_type_pid_t" 1>&6
-if test $ac_cv_type_pid_t = no; then
- cat >> confdefs.h <<\EOF
-#define pid_t int
-EOF
-
-fi
-
-ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:5313: checking for vfork.h" >&5
+for ac_hdr in unistd.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:5226: checking for $ac_hdr" >&5
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 5318 "configure"
+#line 5231 "configure"
#include "confdefs.h"
-#include <vfork.h>
+#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
-#define HAVE_VFORK_H 1
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
EOF
-
+
else
echo "$ac_t""no" 1>&6
fi
+done
-echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:5348: checking for working vfork" >&5
-if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$cross_compiling" = yes; then
- echo $ac_n "checking for vfork""... $ac_c" 1>&6
-echo "configure:5354: checking for vfork" >&5
-if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
+for ac_func in getpagesize
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:5265: checking for $ac_func" >&5
+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 5359 "configure"
+#line 5270 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char vfork(); below. */
+ which can conflict with char $ac_func(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char vfork();
+char $ac_func();
int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
-#if defined (__stub_vfork) || defined (__stub___vfork)
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-vfork();
+$ac_func();
#endif
; return 0; }
EOF
-if { (eval echo configure:5382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
- eval "ac_cv_func_vfork=yes"
+ eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- eval "ac_cv_func_vfork=no"
+ eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
-if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6
- :
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
else
echo "$ac_t""no" 1>&6
fi
+done
-ac_cv_func_vfork_works=$ac_cv_func_vfork
+echo $ac_n "checking for working mmap""... $ac_c" 1>&6
+echo "configure:5318: checking for working mmap" >&5
+if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 5404 "configure"
+#line 5326 "configure"
#include "confdefs.h"
-/* Thanks to Paul Eggert for this test. */
-#include <stdio.h>
+
+/* Thanks to Mike Haertel and Jim Avera for this test.
+ Here is a matrix of mmap possibilities:
+ mmap private not fixed
+ mmap private fixed at somewhere currently unmapped
+ mmap private fixed at somewhere already mapped
+ mmap shared not fixed
+ mmap shared fixed at somewhere currently unmapped
+ mmap shared fixed at somewhere already mapped
+ For private mappings, we should verify that changes cannot be read()
+ back from the file, nor mmap's back from the file at a different
+ address. (There have been systems where private was not correctly
+ implemented like the infamous i386 svr4.0, and systems where the
+ VM page cache was not coherent with the filesystem buffer cache
+ like early versions of FreeBSD and possibly contemporary NetBSD.)
+ For shared mappings, we should conversely verify that changes get
+ propogated back to all the places they're supposed to be.
+
+ Grep wants private fixed already mapped.
+ The main things grep needs to know about mmap are:
+ * does it exist and is it safe to write into the mmap'd area
+ * how to use it (BSD variants) */
#include <sys/types.h>
-#include <sys/stat.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_VFORK_H
-#include <vfork.h>
-#endif
-/* On some sparc systems, changes by the child to local and incoming
- argument registers are propagated back to the parent.
- The compiler is told about this with #include <vfork.h>,
- but some compilers (e.g. gcc -O) don't grok <vfork.h>.
- Test for this by using a static variable whose address
- is put into a register that is clobbered by the vfork. */
-static
+#include <fcntl.h>
+#include <sys/mman.h>
+
+/* This mess was copied from the GNU getpagesize.h. */
+#ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+# include <unistd.h>
+# endif
+
+/* Assume that all systems that can run configure have sys/param.h. */
+# ifndef HAVE_SYS_PARAM_H
+# define HAVE_SYS_PARAM_H 1
+# endif
+
+# ifdef _SC_PAGESIZE
+# define getpagesize() sysconf(_SC_PAGESIZE)
+# else /* no _SC_PAGESIZE */
+# ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+# ifdef EXEC_PAGESIZE
+# define getpagesize() EXEC_PAGESIZE
+# else /* no EXEC_PAGESIZE */
+# ifdef NBPG
+# define getpagesize() NBPG * CLSIZE
+# ifndef CLSIZE
+# define CLSIZE 1
+# endif /* no CLSIZE */
+# else /* no NBPG */
+# ifdef NBPC
+# define getpagesize() NBPC
+# else /* no NBPC */
+# ifdef PAGESIZE
+# define getpagesize() PAGESIZE
+# endif /* PAGESIZE */
+# endif /* no NBPC */
+# endif /* no NBPG */
+# endif /* no EXEC_PAGESIZE */
+# else /* no HAVE_SYS_PARAM_H */
+# define getpagesize() 8192 /* punt totally */
+# endif /* no HAVE_SYS_PARAM_H */
+# endif /* no _SC_PAGESIZE */
+
+#endif /* no HAVE_GETPAGESIZE */
+
#ifdef __cplusplus
-sparc_address_test (int arg)
+extern "C" { void *malloc(unsigned); }
#else
-sparc_address_test (arg) int arg;
+char *malloc();
#endif
-{
- static pid_t child;
- if (!child) {
- child = vfork ();
- if (child < 0) {
- perror ("vfork");
- _exit(2);
- }
- if (!child) {
- arg = getpid();
- write(-1, "", 0);
- _exit (arg);
- }
- }
-}
-main() {
- pid_t parent = getpid ();
- pid_t child;
- sparc_address_test ();
+int
+main()
+{
+ char *data, *data2, *data3;
+ int i, pagesize;
+ int fd;
- child = vfork ();
+ pagesize = getpagesize();
- if (child == 0) {
- /* Here is another test for sparc vfork register problems.
- This test uses lots of local variables, at least
- as many local variables as main has allocated so far
- including compiler temporaries. 4 locals are enough for
- gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
- A buggy compiler should reuse the register of parent
- for one of the local variables, since it will think that
- parent can't possibly be used any more in this routine.
- Assigning to the local variable will thus munge parent
- in the parent process. */
- pid_t
- p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
- p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
- /* Convince the compiler that p..p7 are live; otherwise, it might
- use the same hardware register for all 8 local variables. */
- if (p != p1 || p != p2 || p != p3 || p != p4
- || p != p5 || p != p6 || p != p7)
- _exit(1);
-
- /* On some systems (e.g. IRIX 3.3),
- vfork doesn't separate parent from child file descriptors.
- If the child closes a descriptor before it execs or exits,
- this munges the parent's descriptor as well.
- Test for this by closing stdout in the child. */
- _exit(close(fileno(stdout)) != 0);
- } else {
- int status;
- struct stat st;
-
- while (wait(&status) != child)
- ;
- exit(
- /* Was there some problem with vforking? */
- child < 0
-
- /* Did the child fail? (This shouldn't happen.) */
- || status
+ /*
+ * First, make a file with some known garbage in it.
+ */
+ data = malloc(pagesize);
+ if (!data)
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ *(data + i) = rand();
+ umask(0);
+ fd = creat("conftestmmap", 0600);
+ if (fd < 0)
+ exit(1);
+ if (write(fd, data, pagesize) != pagesize)
+ exit(1);
+ close(fd);
- /* Did the vfork/compiler bug occur? */
- || parent != getpid()
+ /*
+ * Next, try to mmap the file at a fixed address which
+ * already has something else allocated at it. If we can,
+ * also make sure that we see the same garbage.
+ */
+ fd = open("conftestmmap", O_RDWR);
+ if (fd < 0)
+ exit(1);
+ data2 = malloc(2 * pagesize);
+ if (!data2)
+ exit(1);
+ data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
+ if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_FIXED, fd, 0L))
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data2 + i))
+ exit(1);
- /* Did the file descriptor bug occur? */
- || fstat(fileno(stdout), &st) != 0
- );
- }
+ /*
+ * Finally, make sure that changes to the mapped area
+ * do not percolate back to the file as seen by read().
+ * (This is a bug on some variants of i386 svr4.0.)
+ */
+ for (i = 0; i < pagesize; ++i)
+ *(data2 + i) = *(data2 + i) + 1;
+ data3 = malloc(pagesize);
+ if (!data3)
+ exit(1);
+ if (read(fd, data3, pagesize) != pagesize)
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data3 + i))
+ exit(1);
+ close(fd);
+ unlink("conftestmmap");
+ exit(0);
}
+
EOF
-if { (eval echo configure:5499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
- ac_cv_func_vfork_works=yes
+ ac_cv_func_mmap_fixed_mapped=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
- ac_cv_func_vfork_works=no
+ ac_cv_func_mmap_fixed_mapped=no
fi
rm -fr conftest*
fi
fi
-echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
-if test $ac_cv_func_vfork_works = no; then
+echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
+if test $ac_cv_func_mmap_fixed_mapped = yes; then
cat >> confdefs.h <<\EOF
-#define vfork fork
+#define HAVE_MMAP 1
EOF
fi
-if test "$cross_compiling" = no; then
- echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:5523: checking whether setpgrp takes no argument" >&5
-if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
+echo $ac_n "checking for pid_t""... $ac_c" 1>&6
+echo "configure:5489: checking for pid_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$cross_compiling" = yes; then
- { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 5531 "configure"
+#line 5494 "configure"
#include "confdefs.h"
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
#endif
-
-/*
- * If this system has a BSD-style setpgrp, which takes arguments, exit
- * successfully.
- */
-main()
-{
- if (setpgrp(1,1) == -1)
- exit(0);
- else
- exit(1);
-}
-
EOF
-if { (eval echo configure:5551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- ac_cv_func_setpgrp_void=no
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_type_pid_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_func_setpgrp_void=yes
-fi
-rm -fr conftest*
+ rm -rf conftest*
+ ac_cv_type_pid_t=no
fi
-
+rm -f conftest*
fi
-
-echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
-if test $ac_cv_func_setpgrp_void = yes; then
+echo "$ac_t""$ac_cv_type_pid_t" 1>&6
+if test $ac_cv_type_pid_t = no; then
cat >> confdefs.h <<\EOF
-#define SETPGRP_VOID 1
+#define pid_t int
EOF
fi
-else
- echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:5576: checking whether setpgrp takes no argument" >&5
-if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
+ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
+echo "configure:5523: checking for vfork.h" >&5
+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 5581 "configure"
+#line 5528 "configure"
#include "confdefs.h"
-
-#include <unistd.h>
-
-int main() {
-
- if (setpgrp(1,1) == -1)
- exit (0);
- else
- exit (1);
-
-; return 0; }
+#include <vfork.h>
EOF
-if { (eval echo configure:5595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:5533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
rm -rf conftest*
- ac_cv_func_setpgrp_void=no
+ eval "ac_cv_header_$ac_safe=yes"
else
+ echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- ac_cv_func_setpgrp_void=yes
+ eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
-
-echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
-if test $ac_cv_func_setpgrp_void = yes; then
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
-#define SETPGRP_VOID 1
+#define HAVE_VFORK_H 1
EOF
-fi
+else
+ echo "$ac_t""no" 1>&6
fi
-# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
-# since sigsetjmp might only be defined as a macro.
-echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
-echo "configure:5619: checking for sigsetjmp" >&5
-if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
+echo $ac_n "checking for working vfork""... $ac_c" 1>&6
+echo "configure:5558: checking for working vfork" >&5
+if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ echo $ac_n "checking for vfork""... $ac_c" 1>&6
+echo "configure:5564: checking for vfork" >&5
+if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5624 "configure"
+#line 5569 "configure"
#include "confdefs.h"
-
-#include <setjmp.h>
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char vfork(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char vfork();
int main() {
-sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_vfork) || defined (__stub___vfork)
+choke me
+#else
+vfork();
+#endif
+
; return 0; }
EOF
-if { (eval echo configure:5633: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
- gdb_cv_func_sigsetjmp=yes
+ eval "ac_cv_func_vfork=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- gdb_cv_func_sigsetjmp=no
+ eval "ac_cv_func_vfork=no"
fi
rm -f conftest*
fi
-echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6
-if test $gdb_cv_func_sigsetjmp = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_SIGSETJMP 1
-EOF
-
+if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ :
+else
+ echo "$ac_t""no" 1>&6
fi
-# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
-# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
-echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
-echo "configure:5656: checking for r_fs in struct reg" >&5
-if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ac_cv_func_vfork_works=$ac_cv_func_vfork
else
cat > conftest.$ac_ext <<EOF
-#line 5661 "configure"
+#line 5614 "configure"
#include "confdefs.h"
-#include <machine/reg.h>
-int main() {
-struct reg r; r.r_fs;
-; return 0; }
-EOF
-if { (eval echo configure:5668: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- gdb_cv_struct_reg_r_fs=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- gdb_cv_struct_reg_r_fs=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
-if test $gdb_cv_struct_reg_r_fs = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_REG_R_FS 1
-EOF
+/* Thanks to Paul Eggert for this test. */
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_VFORK_H
+#include <vfork.h>
+#endif
+/* On some sparc systems, changes by the child to local and incoming
+ argument registers are propagated back to the parent.
+ The compiler is told about this with #include <vfork.h>,
+ but some compilers (e.g. gcc -O) don't grok <vfork.h>.
+ Test for this by using a static variable whose address
+ is put into a register that is clobbered by the vfork. */
+static
+#ifdef __cplusplus
+sparc_address_test (int arg)
+#else
+sparc_address_test (arg) int arg;
+#endif
+{
+ static pid_t child;
+ if (!child) {
+ child = vfork ();
+ if (child < 0) {
+ perror ("vfork");
+ _exit(2);
+ }
+ if (!child) {
+ arg = getpid();
+ write(-1, "", 0);
+ _exit (arg);
+ }
+ }
+}
+main() {
+ pid_t parent = getpid ();
+ pid_t child;
-fi
-echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
-echo "configure:5688: checking for r_gs in struct reg" >&5
-if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5693 "configure"
-#include "confdefs.h"
-#include <machine/reg.h>
-int main() {
-struct reg r; r.r_gs;
-; return 0; }
-EOF
-if { (eval echo configure:5700: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- gdb_cv_struct_reg_r_gs=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- gdb_cv_struct_reg_r_gs=no
-fi
-rm -f conftest*
-fi
+ sparc_address_test ();
-echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
-if test $gdb_cv_struct_reg_r_gs = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_REG_R_GS 1
-EOF
+ child = vfork ();
-fi
+ if (child == 0) {
+ /* Here is another test for sparc vfork register problems.
+ This test uses lots of local variables, at least
+ as many local variables as main has allocated so far
+ including compiler temporaries. 4 locals are enough for
+ gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
+ A buggy compiler should reuse the register of parent
+ for one of the local variables, since it will think that
+ parent can't possibly be used any more in this routine.
+ Assigning to the local variable will thus munge parent
+ in the parent process. */
+ pid_t
+ p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
+ p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
+ /* Convince the compiler that p..p7 are live; otherwise, it might
+ use the same hardware register for all 8 local variables. */
+ if (p != p1 || p != p2 || p != p3 || p != p4
+ || p != p5 || p != p6 || p != p7)
+ _exit(1);
-# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
-echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
-echo "configure:5722: checking for PTRACE_GETREGS" >&5
-if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5727 "configure"
-#include "confdefs.h"
-#include <sys/ptrace.h>
-int main() {
-PTRACE_GETREGS;
-; return 0; }
-EOF
-if { (eval echo configure:5734: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- gdb_cv_have_ptrace_getregs=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- gdb_cv_have_ptrace_getregs=no
-fi
-rm -f conftest*
-fi
+ /* On some systems (e.g. IRIX 3.3),
+ vfork doesn't separate parent from child file descriptors.
+ If the child closes a descriptor before it execs or exits,
+ this munges the parent's descriptor as well.
+ Test for this by closing stdout in the child. */
+ _exit(close(fileno(stdout)) != 0);
+ } else {
+ int status;
+ struct stat st;
-echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
-if test $gdb_cv_have_ptrace_getregs = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_PTRACE_GETREGS 1
-EOF
+ while (wait(&status) != child)
+ ;
+ exit(
+ /* Was there some problem with vforking? */
+ child < 0
-fi
+ /* Did the child fail? (This shouldn't happen.) */
+ || status
-# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
-echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
-echo "configure:5756: checking for PTRACE_GETFPXREGS" >&5
-if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5761 "configure"
-#include "confdefs.h"
-#include <sys/ptrace.h>
-int main() {
-PTRACE_GETFPXREGS;
-; return 0; }
+ /* Did the vfork/compiler bug occur? */
+ || parent != getpid()
+
+ /* Did the file descriptor bug occur? */
+ || fstat(fileno(stdout), &st) != 0
+ );
+ }
+}
EOF
-if { (eval echo configure:5768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- gdb_cv_have_ptrace_getfpxregs=yes
+if { (eval echo configure:5709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ ac_cv_func_vfork_works=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- gdb_cv_have_ptrace_getfpxregs=no
-fi
-rm -f conftest*
+ rm -fr conftest*
+ ac_cv_func_vfork_works=no
fi
-
-echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
-if test $gdb_cv_have_ptrace_getfpxregs = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_PTRACE_GETFPXREGS 1
-EOF
-
+rm -fr conftest*
fi
-# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
-echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
-echo "configure:5790: checking for PT_GETDBREGS" >&5
-if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5795 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/ptrace.h>
-int main() {
-PT_GETDBREGS;
-; return 0; }
-EOF
-if { (eval echo configure:5803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- gdb_cv_have_pt_getdbregs=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- gdb_cv_have_pt_getdbregs=no
-fi
-rm -f conftest*
fi
-echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
-if test $gdb_cv_have_pt_getdbregs = yes; then
+echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
+if test $ac_cv_func_vfork_works = no; then
cat >> confdefs.h <<\EOF
-#define HAVE_PT_GETDBREGS 1
+#define vfork fork
EOF
fi
-# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
-echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
-echo "configure:5825: checking for PT_GETXMMREGS" >&5
-if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
+for ac_func in canonicalize_file_name realpath
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:5734: checking for $ac_func" >&5
+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 5830 "configure"
+#line 5739 "configure"
#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/ptrace.h>
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
int main() {
-PT_GETXMMREGS;
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
; return 0; }
EOF
-if { (eval echo configure:5838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
- gdb_cv_have_pt_getxmmregs=yes
+ eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- gdb_cv_have_pt_getxmmregs=no
+ eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
-echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6
-if test $gdb_cv_have_pt_getxmmregs = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_PT_GETXMMREGS 1
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
EOF
-
+
+else
+ echo "$ac_t""no" 1>&6
fi
+done
-
-for ac_func in socketpair
+for ac_func in poll
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5862: checking for $ac_func" >&5
+echo "configure:5789: checking for $ac_func" >&5
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 5867 "configure"
+#line 5794 "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:5890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
fi
done
-
-
-echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
-echo "configure:5917: checking whether malloc must be declared" >&5
-if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
+for ac_func in sbrk
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:5844: checking for $ac_func" >&5
+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 5922 "configure"
+#line 5849 "configure"
#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
+$ac_func();
#endif
-int main() {
-char *(*pfn) = (char *(*)) malloc
+
; return 0; }
EOF
-if { (eval echo configure:5943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
- bfd_cv_decl_needed_malloc=no
+ eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- bfd_cv_decl_needed_malloc=yes
+ eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
-echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
-if test $bfd_cv_decl_needed_malloc = yes; then
- cat >> confdefs.h <<\EOF
-#define NEED_DECLARATION_MALLOC 1
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
EOF
-
+
+else
+ echo "$ac_t""no" 1>&6
fi
+done
-echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
-echo "configure:5964: checking whether realloc must be declared" >&5
-if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
+for ac_func in setpgid setpgrp
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:5899: checking for $ac_func" >&5
+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 5969 "configure"
+#line 5904 "configure"
#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
+$ac_func();
#endif
-int main() {
-char *(*pfn) = (char *(*)) realloc
+
; return 0; }
EOF
-if { (eval echo configure:5990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
- bfd_cv_decl_needed_realloc=no
+ eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- bfd_cv_decl_needed_realloc=yes
+ eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
-echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
-if test $bfd_cv_decl_needed_realloc = yes; then
- cat >> confdefs.h <<\EOF
-#define NEED_DECLARATION_REALLOC 1
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
EOF
-
+
+else
+ echo "$ac_t""no" 1>&6
fi
+done
-echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:6011: checking whether free must be declared" >&5
-if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
+for ac_func in sigaction sigprocmask
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:5954: checking for $ac_func" >&5
+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 6016 "configure"
+#line 5959 "configure"
#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
+$ac_func();
#endif
-int main() {
-char *(*pfn) = (char *(*)) free
+
; return 0; }
EOF
-if { (eval echo configure:6037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
- bfd_cv_decl_needed_free=no
+ eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- bfd_cv_decl_needed_free=yes
+ eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
-echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
-if test $bfd_cv_decl_needed_free = yes; then
- cat >> confdefs.h <<\EOF
-#define NEED_DECLARATION_FREE 1
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
EOF
-
+ sigsetmask
+else
+ echo "$ac_t""no" 1>&6
fi
+done
-echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
-echo "configure:6058: checking whether strerror must be declared" >&5
-if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
+for ac_func in socketpair
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:6009: checking for $ac_func" >&5
+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 6063 "configure"
+#line 6014 "configure"
#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
+$ac_func();
#endif
-int main() {
-char *(*pfn) = (char *(*)) strerror
+
; return 0; }
EOF
-if { (eval echo configure:6084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
- bfd_cv_decl_needed_strerror=no
+ eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- bfd_cv_decl_needed_strerror=yes
+ eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
-echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
-if test $bfd_cv_decl_needed_strerror = yes; then
- cat >> confdefs.h <<\EOF
-#define NEED_DECLARATION_STRERROR 1
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
EOF
-
+
+else
+ echo "$ac_t""no" 1>&6
fi
+done
-echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
-echo "configure:6105: checking whether strdup must be declared" >&5
-if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
+
+if test "$cross_compiling" = no; then
+ echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
+echo "configure:6064: checking whether setpgrp takes no argument" >&5
+if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 6110 "configure"
+#line 6072 "configure"
#include "confdefs.h"
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
-int main() {
-char *(*pfn) = (char *(*)) strdup
-; return 0; }
+
+/*
+ * If this system has a BSD-style setpgrp, which takes arguments, exit
+ * successfully.
+ */
+main()
+{
+ if (setpgrp(1,1) == -1)
+ exit(0);
+ else
+ exit(1);
+}
+
EOF
-if { (eval echo configure:6131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- bfd_cv_decl_needed_strdup=no
+if { (eval echo configure:6092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ ac_cv_func_setpgrp_void=no
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- bfd_cv_decl_needed_strdup=yes
+ rm -fr conftest*
+ ac_cv_func_setpgrp_void=yes
fi
-rm -f conftest*
+rm -fr conftest*
fi
-echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
-if test $bfd_cv_decl_needed_strdup = yes; then
- cat >> confdefs.h <<\EOF
-#define NEED_DECLARATION_STRDUP 1
+
+fi
+
+echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
+if test $ac_cv_func_setpgrp_void = yes; then
+ cat >> confdefs.h <<\EOF
+#define SETPGRP_VOID 1
EOF
fi
-echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:6152: checking whether strstr must be declared" >&5
-if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
+else
+ echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
+echo "configure:6117: checking whether setpgrp takes no argument" >&5
+if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6157 "configure"
+#line 6122 "configure"
#include "confdefs.h"
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
+
int main() {
-char *(*pfn) = (char *(*)) strstr
+
+ if (setpgrp(1,1) == -1)
+ exit (0);
+ else
+ exit (1);
+
; return 0; }
EOF
-if { (eval echo configure:6178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- bfd_cv_decl_needed_strstr=no
+ ac_cv_func_setpgrp_void=no
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- bfd_cv_decl_needed_strstr=yes
+ ac_cv_func_setpgrp_void=yes
fi
rm -f conftest*
fi
-echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
-if test $bfd_cv_decl_needed_strstr = yes; then
+echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
+if test $ac_cv_func_setpgrp_void = yes; then
cat >> confdefs.h <<\EOF
-#define NEED_DECLARATION_STRSTR 1
+#define SETPGRP_VOID 1
EOF
+fi
fi
-echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
-echo "configure:6199: checking whether canonicalize_file_name must be declared" >&5
-if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
+# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
+# since sigsetjmp might only be defined as a macro.
+echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
+echo "configure:6160: checking for sigsetjmp" >&5
+if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6204 "configure"
+#line 6165 "configure"
#include "confdefs.h"
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
+#include <setjmp.h>
+
int main() {
-char *(*pfn) = (char *(*)) canonicalize_file_name
+sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
; return 0; }
EOF
-if { (eval echo configure:6225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- bfd_cv_decl_needed_canonicalize_file_name=no
+ gdb_cv_func_sigsetjmp=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- bfd_cv_decl_needed_canonicalize_file_name=yes
+ gdb_cv_func_sigsetjmp=no
fi
rm -f conftest*
fi
-echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6
-if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
+echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6
+if test $gdb_cv_func_sigsetjmp = yes; then
cat >> confdefs.h <<\EOF
-#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
+#define HAVE_SIGSETJMP 1
EOF
fi
-
-# The following save_state_t checkery is only necessary for HPUX
-# versions earlier than 10.20. When those fade from memory, this
-# could be expunged. --jsm 1999-03-22
-
-echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
-echo "configure:6251: checking for HPUX save_state structure" >&5
-cat > conftest.$ac_ext <<EOF
-#line 6253 "configure"
+# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
+# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
+echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
+echo "configure:6197: checking for r_fs in struct reg" >&5
+if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 6202 "configure"
#include "confdefs.h"
-#include <machine/save_state.h>
+#include <machine/reg.h>
+int main() {
+struct reg r; r.r_fs;
+; return 0; }
EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "save_state_t" >/dev/null 2>&1; then
+if { (eval echo configure:6209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- gdb_cv_hpux_savestate=yes
+ gdb_cv_struct_reg_r_fs=yes
else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
rm -rf conftest*
- gdb_cv_hpux_savestate=no
+ gdb_cv_struct_reg_r_fs=no
fi
rm -f conftest*
+fi
-cat > conftest.$ac_ext <<EOF
-#line 6268 "configure"
+echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
+if test $gdb_cv_struct_reg_r_fs = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_STRUCT_REG_R_FS 1
+EOF
+
+fi
+echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
+echo "configure:6229: checking for r_gs in struct reg" >&5
+if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 6234 "configure"
#include "confdefs.h"
-#include <machine/save_state.h>
+#include <machine/reg.h>
+int main() {
+struct reg r; r.r_gs;
+; return 0; }
EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "ss_wide" >/dev/null 2>&1; then
+if { (eval echo configure:6241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- gdb_cv_hpux_sswide=yes
+ gdb_cv_struct_reg_r_gs=yes
else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
rm -rf conftest*
- gdb_cv_hpux_sswide=no
+ gdb_cv_struct_reg_r_gs=no
fi
rm -f conftest*
-
-if test $gdb_cv_hpux_savestate = yes
-then
- cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_SAVE_STATE_T 1
-EOF
-
-fi
-if test $gdb_cv_hpux_sswide = yes
-then
- cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_MEMBER_SS_WIDE 1
-EOF
-
fi
-echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
-
-
-# If we are configured native on GNU/Linux, work around problems with
-# sys/procfs.h
-# Also detect which type of /proc is in use, such as for Unixware or Solaris.
-
-if test "${target}" = "${host}"; then
- case "${host}" in
- i[3456]86-*-linux*)
- cat >> confdefs.h <<\EOF
-#define START_INFERIOR_TRAPS_EXPECTED 2
-EOF
-
- cat >> confdefs.h <<\EOF
-#define sys_quotactl 1
-EOF
-
- ;;
- ia64-*-aix*)
- cat >> confdefs.h <<\EOF
-#define NEW_PROC_API 1
-EOF
-
- ;;
- *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
- cat >> confdefs.h <<\EOF
-#define NEW_PROC_API 1
-EOF
- ;;
- *-*-solaris2.[678])
- cat >> confdefs.h <<\EOF
-#define NEW_PROC_API 1
+echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
+if test $gdb_cv_struct_reg_r_gs = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_STRUCT_REG_R_GS 1
EOF
- ;;
- esac
fi
-if test "$ac_cv_header_sys_procfs_h" = yes; then
- echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:6338: checking for pstatus_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
+# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
+echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
+echo "configure:6263: checking for PTRACE_GETREGS" >&5
+if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6343 "configure"
+#line 6268 "configure"
#include "confdefs.h"
-
-#define _SYSCALL32
-#include <sys/procfs.h>
+#include <sys/ptrace.h>
int main() {
-pstatus_t avar
+PTRACE_GETREGS;
; return 0; }
EOF
-if { (eval echo configure:6352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- bfd_cv_have_sys_procfs_type_pstatus_t=yes
+ gdb_cv_have_ptrace_getregs=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- bfd_cv_have_sys_procfs_type_pstatus_t=no
-
+ gdb_cv_have_ptrace_getregs=no
fi
rm -f conftest*
fi
- if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_PSTATUS_T 1
+echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
+if test $gdb_cv_have_ptrace_getregs = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_PTRACE_GETREGS 1
EOF
- fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
+fi
- echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:6374: checking for prrun_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
+# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
+echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
+echo "configure:6297: checking for PTRACE_GETFPXREGS" >&5
+if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6379 "configure"
+#line 6302 "configure"
#include "confdefs.h"
-
-#define _SYSCALL32
-#include <sys/procfs.h>
+#include <sys/ptrace.h>
int main() {
-prrun_t avar
+PTRACE_GETFPXREGS;
; return 0; }
EOF
-if { (eval echo configure:6388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- bfd_cv_have_sys_procfs_type_prrun_t=yes
+ gdb_cv_have_ptrace_getfpxregs=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- bfd_cv_have_sys_procfs_type_prrun_t=no
-
+ gdb_cv_have_ptrace_getfpxregs=no
fi
rm -f conftest*
fi
- if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_PRRUN_T 1
+echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
+if test $gdb_cv_have_ptrace_getfpxregs = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_PTRACE_GETFPXREGS 1
EOF
- fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
+fi
- echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:6410: checking for gregset_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
+# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
+echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
+echo "configure:6331: checking for PT_GETDBREGS" >&5
+if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6415 "configure"
+#line 6336 "configure"
#include "confdefs.h"
-
-#define _SYSCALL32
-#include <sys/procfs.h>
+#include <sys/types.h>
+#include <sys/ptrace.h>
int main() {
-gregset_t avar
+PT_GETDBREGS;
; return 0; }
EOF
-if { (eval echo configure:6424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- bfd_cv_have_sys_procfs_type_gregset_t=yes
+ gdb_cv_have_pt_getdbregs=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- bfd_cv_have_sys_procfs_type_gregset_t=no
-
+ gdb_cv_have_pt_getdbregs=no
fi
rm -f conftest*
fi
- if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_GREGSET_T 1
+echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
+if test $gdb_cv_have_pt_getdbregs = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_PT_GETDBREGS 1
EOF
- fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
+fi
- echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:6446: checking for fpregset_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
+# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
+echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
+echo "configure:6366: checking for PT_GETXMMREGS" >&5
+if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6451 "configure"
+#line 6371 "configure"
#include "confdefs.h"
-
-#define _SYSCALL32
-#include <sys/procfs.h>
+#include <sys/types.h>
+#include <sys/ptrace.h>
int main() {
-fpregset_t avar
+PT_GETXMMREGS;
; return 0; }
EOF
-if { (eval echo configure:6460: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- bfd_cv_have_sys_procfs_type_fpregset_t=yes
+ gdb_cv_have_pt_getxmmregs=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- bfd_cv_have_sys_procfs_type_fpregset_t=no
-
+ gdb_cv_have_pt_getxmmregs=no
fi
rm -f conftest*
fi
- if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_FPREGSET_T 1
+echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6
+if test $gdb_cv_have_pt_getxmmregs = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_PT_GETXMMREGS 1
EOF
- fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
+fi
- echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:6482: checking for prgregset_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
+
+echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
+echo "configure:6401: checking whether malloc must be declared" >&5
+if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6487 "configure"
+#line 6406 "configure"
#include "confdefs.h"
-#define _SYSCALL32
-#include <sys/procfs.h>
+#include <stdio.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
int main() {
-prgregset_t avar
+char *(*pfn) = (char *(*)) malloc
; return 0; }
EOF
-if { (eval echo configure:6496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- bfd_cv_have_sys_procfs_type_prgregset_t=yes
+ bfd_cv_decl_needed_malloc=no
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- bfd_cv_have_sys_procfs_type_prgregset_t=no
-
+ bfd_cv_decl_needed_malloc=yes
fi
rm -f conftest*
fi
- if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_PRGREGSET_T 1
+echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
+if test $bfd_cv_decl_needed_malloc = yes; then
+ cat >> confdefs.h <<\EOF
+#define NEED_DECLARATION_MALLOC 1
EOF
- fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
+fi
- echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:6518: checking for prfpregset_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
+echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
+echo "configure:6448: checking whether realloc must be declared" >&5
+if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6523 "configure"
+#line 6453 "configure"
#include "confdefs.h"
-#define _SYSCALL32
-#include <sys/procfs.h>
+#include <stdio.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
int main() {
-prfpregset_t avar
+char *(*pfn) = (char *(*)) realloc
; return 0; }
EOF
-if { (eval echo configure:6532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- bfd_cv_have_sys_procfs_type_prfpregset_t=yes
+ bfd_cv_decl_needed_realloc=no
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- bfd_cv_have_sys_procfs_type_prfpregset_t=no
-
+ bfd_cv_decl_needed_realloc=yes
fi
rm -f conftest*
fi
- if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_PRFPREGSET_T 1
+echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
+if test $bfd_cv_decl_needed_realloc = yes; then
+ cat >> confdefs.h <<\EOF
+#define NEED_DECLARATION_REALLOC 1
EOF
- fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
+fi
- echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:6554: checking for prgregset32_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
+echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
+echo "configure:6495: checking whether free must be declared" >&5
+if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6559 "configure"
+#line 6500 "configure"
#include "confdefs.h"
-#define _SYSCALL32
-#include <sys/procfs.h>
+#include <stdio.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
int main() {
-prgregset32_t avar
+char *(*pfn) = (char *(*)) free
; return 0; }
EOF
-if { (eval echo configure:6568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- bfd_cv_have_sys_procfs_type_prgregset32_t=yes
+ bfd_cv_decl_needed_free=no
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- bfd_cv_have_sys_procfs_type_prgregset32_t=no
-
+ bfd_cv_decl_needed_free=yes
fi
rm -f conftest*
fi
- if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_PRGREGSET32_T 1
+echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
+if test $bfd_cv_decl_needed_free = yes; then
+ cat >> confdefs.h <<\EOF
+#define NEED_DECLARATION_FREE 1
EOF
- fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
+fi
- echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:6590: checking for prfpregset32_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
+echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
+echo "configure:6542: checking whether strerror must be declared" >&5
+if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6595 "configure"
+#line 6547 "configure"
#include "confdefs.h"
-#define _SYSCALL32
-#include <sys/procfs.h>
+#include <stdio.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
int main() {
-prfpregset32_t avar
+char *(*pfn) = (char *(*)) strerror
; return 0; }
EOF
-if { (eval echo configure:6604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
+ bfd_cv_decl_needed_strerror=no
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- bfd_cv_have_sys_procfs_type_prfpregset32_t=no
-
+ bfd_cv_decl_needed_strerror=yes
fi
rm -f conftest*
fi
- if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_PRFPREGSET32_T 1
+echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
+if test $bfd_cv_decl_needed_strerror = yes; then
+ cat >> confdefs.h <<\EOF
+#define NEED_DECLARATION_STRERROR 1
EOF
- fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
+fi
- echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:6626: checking for lwpid_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
+echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
+echo "configure:6589: checking whether strdup must be declared" >&5
+if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6631 "configure"
+#line 6594 "configure"
#include "confdefs.h"
-#define _SYSCALL32
-#include <sys/procfs.h>
+#include <stdio.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
int main() {
-lwpid_t avar
+char *(*pfn) = (char *(*)) strdup
; return 0; }
EOF
-if { (eval echo configure:6640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- bfd_cv_have_sys_procfs_type_lwpid_t=yes
+ bfd_cv_decl_needed_strdup=no
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- bfd_cv_have_sys_procfs_type_lwpid_t=no
-
+ bfd_cv_decl_needed_strdup=yes
fi
rm -f conftest*
fi
- if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_LWPID_T 1
+echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
+if test $bfd_cv_decl_needed_strdup = yes; then
+ cat >> confdefs.h <<\EOF
+#define NEED_DECLARATION_STRDUP 1
EOF
- fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
+fi
- echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:6662: checking for psaddr_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
+echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
+echo "configure:6636: checking whether strstr must be declared" >&5
+if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6667 "configure"
+#line 6641 "configure"
#include "confdefs.h"
-#define _SYSCALL32
-#include <sys/procfs.h>
+#include <stdio.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
int main() {
-psaddr_t avar
+char *(*pfn) = (char *(*)) strstr
; return 0; }
EOF
-if { (eval echo configure:6676: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- bfd_cv_have_sys_procfs_type_psaddr_t=yes
+ bfd_cv_decl_needed_strstr=no
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- bfd_cv_have_sys_procfs_type_psaddr_t=no
-
+ bfd_cv_decl_needed_strstr=yes
fi
rm -f conftest*
fi
- if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_PSADDR_T 1
+echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
+if test $bfd_cv_decl_needed_strstr = yes; then
+ cat >> confdefs.h <<\EOF
+#define NEED_DECLARATION_STRSTR 1
EOF
- fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
+fi
- echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:6698: checking for prsysent_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
+echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
+echo "configure:6683: checking whether canonicalize_file_name must be declared" >&5
+if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6703 "configure"
+#line 6688 "configure"
#include "confdefs.h"
-#define _SYSCALL32
-#include <sys/procfs.h>
+#include <stdio.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
int main() {
-prsysent_t avar
+char *(*pfn) = (char *(*)) canonicalize_file_name
; return 0; }
EOF
-if { (eval echo configure:6712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- bfd_cv_have_sys_procfs_type_prsysent_t=yes
+ bfd_cv_decl_needed_canonicalize_file_name=no
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- bfd_cv_have_sys_procfs_type_prsysent_t=no
-
+ bfd_cv_decl_needed_canonicalize_file_name=yes
fi
rm -f conftest*
fi
- if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_PRSYSENT_T 1
+echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6
+if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
+ cat >> confdefs.h <<\EOF
+#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
EOF
- fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
+fi
- echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:6734: checking for pr_sigset_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
+
+# The following save_state_t checkery is only necessary for HPUX
+# versions earlier than 10.20. When those fade from memory, this
+# could be expunged. --jsm 1999-03-22
+
+echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
+echo "configure:6735: checking for HPUX save_state structure" >&5
+cat > conftest.$ac_ext <<EOF
+#line 6737 "configure"
+#include "confdefs.h"
+#include <machine/save_state.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "save_state_t" >/dev/null 2>&1; then
+ rm -rf conftest*
+ gdb_cv_hpux_savestate=yes
+else
+ rm -rf conftest*
+ gdb_cv_hpux_savestate=no
+fi
+rm -f conftest*
+
+cat > conftest.$ac_ext <<EOF
+#line 6752 "configure"
+#include "confdefs.h"
+#include <machine/save_state.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "ss_wide" >/dev/null 2>&1; then
+ rm -rf conftest*
+ gdb_cv_hpux_sswide=yes
+else
+ rm -rf conftest*
+ gdb_cv_hpux_sswide=no
+fi
+rm -f conftest*
+
+if test $gdb_cv_hpux_savestate = yes
+then
+ cat >> confdefs.h <<\EOF
+#define HAVE_STRUCT_SAVE_STATE_T 1
+EOF
+
+fi
+if test $gdb_cv_hpux_sswide = yes
+then
+ cat >> confdefs.h <<\EOF
+#define HAVE_STRUCT_MEMBER_SS_WIDE 1
+EOF
+
+fi
+echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
+
+
+# If we are configured native on GNU/Linux, work around problems with
+# sys/procfs.h
+# Also detect which type of /proc is in use, such as for Unixware or Solaris.
+
+if test "${target}" = "${host}"; then
+ case "${host}" in
+ i[3456]86-*-linux*)
+ cat >> confdefs.h <<\EOF
+#define START_INFERIOR_TRAPS_EXPECTED 2
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define sys_quotactl 1
+EOF
+
+ ;;
+ ia64-*-aix*)
+ cat >> confdefs.h <<\EOF
+#define NEW_PROC_API 1
+EOF
+
+ ;;
+ *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
+ cat >> confdefs.h <<\EOF
+#define NEW_PROC_API 1
+EOF
+
+ ;;
+ *-*-solaris2.[678])
+ cat >> confdefs.h <<\EOF
+#define NEW_PROC_API 1
+EOF
+
+ ;;
+ esac
+fi
+
+if test "$ac_cv_header_sys_procfs_h" = yes; then
+ echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:6822: checking for pstatus_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6739 "configure"
+#line 6827 "configure"
#include "confdefs.h"
#define _SYSCALL32
#include <sys/procfs.h>
int main() {
-pr_sigset_t avar
+pstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:6748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
+ bfd_cv_have_sys_procfs_type_pstatus_t=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- bfd_cv_have_sys_procfs_type_pr_sigset_t=no
+ bfd_cv_have_sys_procfs_type_pstatus_t=no
fi
rm -f conftest*
fi
- if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
+ if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
cat >> confdefs.h <<\EOF
-#define HAVE_PR_SIGSET_T 1
+#define HAVE_PSTATUS_T 1
EOF
fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
- echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:6770: checking for pr_sigaction64_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
+ echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:6858: checking for prrun_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6775 "configure"
+#line 6863 "configure"
#include "confdefs.h"
#define _SYSCALL32
#include <sys/procfs.h>
int main() {
-pr_sigaction64_t avar
+prrun_t avar
; return 0; }
EOF
-if { (eval echo configure:6784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
+ bfd_cv_have_sys_procfs_type_prrun_t=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
+ bfd_cv_have_sys_procfs_type_prrun_t=no
fi
rm -f conftest*
fi
- if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
+ if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
cat >> confdefs.h <<\EOF
-#define HAVE_PR_SIGACTION64_T 1
+#define HAVE_PRRUN_T 1
EOF
fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
- echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:6806: checking for pr_siginfo64_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
+ echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:6894: checking for gregset_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6811 "configure"
+#line 6899 "configure"
#include "confdefs.h"
#define _SYSCALL32
#include <sys/procfs.h>
int main() {
-pr_siginfo64_t avar
+gregset_t avar
; return 0; }
EOF
-if { (eval echo configure:6820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
+ bfd_cv_have_sys_procfs_type_gregset_t=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
+ bfd_cv_have_sys_procfs_type_gregset_t=no
fi
rm -f conftest*
fi
- if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
+ if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
cat >> confdefs.h <<\EOF
-#define HAVE_PR_SIGINFO64_T 1
+#define HAVE_GREGSET_T 1
EOF
fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
-
-
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
-
-
- if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
- echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
-echo "configure:6847: checking whether prfpregset_t type is broken" >&5
- if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
+ echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:6930: checking for fpregset_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$cross_compiling" = yes; then
- gdb_cv_prfpregset_t_broken=yes
else
cat > conftest.$ac_ext <<EOF
-#line 6855 "configure"
+#line 6935 "configure"
#include "confdefs.h"
+
+#define _SYSCALL32
#include <sys/procfs.h>
- int main ()
- {
- if (sizeof (prfpregset_t) == sizeof (void *))
- return 1;
- return 0;
- }
+int main() {
+fpregset_t avar
+; return 0; }
EOF
-if { (eval echo configure:6865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- gdb_cv_prfpregset_t_broken=no
+if { (eval echo configure:6944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_fpregset_t=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -fr conftest*
- gdb_cv_prfpregset_t_broken=yes
-fi
-rm -fr conftest*
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_fpregset_t=no
+
fi
-
+rm -f conftest*
fi
- echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
- if test $gdb_cv_prfpregset_t_broken = yes; then
- cat >> confdefs.h <<\EOF
-#define PRFPREGSET_T_BROKEN 1
+ if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_FPREGSET_T 1
EOF
- fi
- fi
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
-
- echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:6890: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
+ echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:6966: checking for prgregset_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6895 "configure"
+#line 6971 "configure"
#include "confdefs.h"
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/procfs.h>
+#define _SYSCALL32
+#include <sys/procfs.h>
int main() {
-
- int dummy;;
- dummy = ioctl(0, PIOCSET, &dummy);
-
+prgregset_t avar
; return 0; }
EOF
-if { (eval echo configure:6908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- gdb_cv_have_procfs_piocset=yes
+ bfd_cv_have_sys_procfs_type_prgregset_t=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- gdb_cv_have_procfs_piocset=no
+ bfd_cv_have_sys_procfs_type_prgregset_t=no
+
fi
rm -f conftest*
fi
- echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
- if test $gdb_cv_have_procfs_piocset = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_PROCFS_PIOCSET 1
+ if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_PRGREGSET_T 1
EOF
- fi
-fi
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
-if test ${host} = ${target} ; then
-
- echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
-echo "configure:6932: checking for member l_addr in struct link_map" >&5
- if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
+ echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:7002: checking for prfpregset_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6937 "configure"
+#line 7007 "configure"
#include "confdefs.h"
-#include <link.h>
+
+#define _SYSCALL32
+#include <sys/procfs.h>
int main() {
-struct link_map lm; (void) lm.l_addr;
+prfpregset_t avar
; return 0; }
EOF
-if { (eval echo configure:6944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- gdb_cv_have_struct_link_map_with_l_members=yes
+ bfd_cv_have_sys_procfs_type_prfpregset_t=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- gdb_cv_have_struct_link_map_with_l_members=no
+ bfd_cv_have_sys_procfs_type_prfpregset_t=no
+
fi
rm -f conftest*
fi
- echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
- if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
+ if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_PRFPREGSET_T 1
EOF
- fi
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
-
- echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
-echo "configure:6966: checking for member lm_addr in struct link_map" >&5
- if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
+ echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:7038: checking for prgregset32_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6971 "configure"
+#line 7043 "configure"
#include "confdefs.h"
-#include <sys/types.h>
-#include <link.h>
+
+#define _SYSCALL32
+#include <sys/procfs.h>
int main() {
-struct link_map lm; (void) lm.lm_addr;
+prgregset32_t avar
; return 0; }
EOF
-if { (eval echo configure:6979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- gdb_cv_have_struct_link_map_with_lm_members=yes
+ bfd_cv_have_sys_procfs_type_prgregset32_t=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- gdb_cv_have_struct_link_map_with_lm_members=no
+ bfd_cv_have_sys_procfs_type_prgregset32_t=no
+
fi
rm -f conftest*
fi
- echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
- if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
+ if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_PRGREGSET32_T 1
EOF
- fi
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
-
- echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
-echo "configure:7001: checking for member som_addr in struct so_map" >&5
- if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
+ echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:7074: checking for prfpregset32_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7006 "configure"
+#line 7079 "configure"
#include "confdefs.h"
-#include <sys/types.h>
-#ifdef HAVE_NLIST_H
-#include <nlist.h>
-#endif
-#include <link.h>
+
+#define _SYSCALL32
+#include <sys/procfs.h>
int main() {
-struct so_map lm; (void) lm.som_addr;
+prfpregset32_t avar
; return 0; }
EOF
-if { (eval echo configure:7017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- gdb_cv_have_struct_so_map_with_som_members=yes
+ bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- gdb_cv_have_struct_so_map_with_som_members=no
+ bfd_cv_have_sys_procfs_type_prfpregset32_t=no
+
fi
rm -f conftest*
fi
- echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
- if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
+ if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_PRFPREGSET32_T 1
EOF
- fi
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
-
- echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
-echo "configure:7039: checking for struct link_map32 in sys/link.h" >&5
- if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
+ echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:7110: checking for lwpid_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7044 "configure"
+#line 7115 "configure"
#include "confdefs.h"
+
#define _SYSCALL32
-#include <sys/link.h>
+#include <sys/procfs.h>
int main() {
-struct link_map32 l;
+lwpid_t avar
; return 0; }
EOF
-if { (eval echo configure:7052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- gdb_cv_have_struct_link_map32=yes
+ bfd_cv_have_sys_procfs_type_lwpid_t=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- gdb_cv_have_struct_link_map32=no
+ bfd_cv_have_sys_procfs_type_lwpid_t=no
+
fi
rm -f conftest*
fi
- echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
- if test $gdb_cv_have_struct_link_map32 = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_LINK_MAP32 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define _SYSCALL32 1
+ if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_LWPID_T 1
EOF
- fi
-fi
-
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
-echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
-echo "configure:7079: checking for long long support in compiler" >&5
-if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
+ echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:7146: checking for psaddr_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7084 "configure"
+#line 7151 "configure"
#include "confdefs.h"
+#define _SYSCALL32
+#include <sys/procfs.h>
int main() {
-
- extern long long foo;
- switch (foo & 2) { case 0: return 1; }
-
+psaddr_t avar
; return 0; }
EOF
-if { (eval echo configure:7094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- gdb_cv_c_long_long=yes
+ bfd_cv_have_sys_procfs_type_psaddr_t=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- gdb_cv_c_long_long=no
+ bfd_cv_have_sys_procfs_type_psaddr_t=no
+
fi
rm -f conftest*
fi
-echo "$ac_t""$gdb_cv_c_long_long" 1>&6
-if test $gdb_cv_c_long_long = yes; then
- cat >> confdefs.h <<\EOF
-#define CC_HAS_LONG_LONG 1
+ if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_PSADDR_T 1
EOF
-fi
-
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
-echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
-echo "configure:7116: checking for long long support in printf" >&5
-if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
+ echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:7182: checking for prsysent_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$cross_compiling" = yes; then
- gdb_cv_printf_has_long_long=no
else
cat > conftest.$ac_ext <<EOF
-#line 7124 "configure"
+#line 7187 "configure"
#include "confdefs.h"
-int main () {
- char buf[32];
- long long l = 0;
- l = (l << 16) + 0x0123;
- l = (l << 16) + 0x4567;
- l = (l << 16) + 0x89ab;
- l = (l << 16) + 0xcdef;
- sprintf (buf, "0x%016llx", l);
- return (strcmp ("0x0123456789abcdef", buf));
-}
+#define _SYSCALL32
+#include <sys/procfs.h>
+int main() {
+prsysent_t avar
+; return 0; }
EOF
-if { (eval echo configure:7138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- gdb_cv_printf_has_long_long=yes
+if { (eval echo configure:7196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_prsysent_t=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -fr conftest*
- gdb_cv_printf_has_long_long=no
-fi
-rm -fr conftest*
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_prsysent_t=no
+
fi
-
+rm -f conftest*
fi
-if test $gdb_cv_printf_has_long_long = yes; then
- cat >> confdefs.h <<\EOF
-#define PRINTF_HAS_LONG_LONG 1
+ if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_PRSYSENT_T 1
EOF
-fi
-echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
-
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
-echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
-echo "configure:7162: checking for long double support in compiler" >&5
-if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
+ echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:7218: checking for pr_sigset_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7167 "configure"
+#line 7223 "configure"
#include "confdefs.h"
+#define _SYSCALL32
+#include <sys/procfs.h>
int main() {
-long double foo;
+pr_sigset_t avar
; return 0; }
EOF
-if { (eval echo configure:7174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- ac_cv_c_long_double=yes
+ bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- ac_cv_c_long_double=no
+ bfd_cv_have_sys_procfs_type_pr_sigset_t=no
+
fi
rm -f conftest*
fi
-echo "$ac_t""$ac_cv_c_long_double" 1>&6
-if test $ac_cv_c_long_double = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_LONG_DOUBLE 1
+ if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_PR_SIGSET_T 1
EOF
-fi
-
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
-echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
-echo "configure:7196: checking for long double support in printf" >&5
-if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
+ echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:7254: checking for pr_sigaction64_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+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 7204 "configure"
+#line 7259 "configure"
#include "confdefs.h"
-int main () {
- char buf[16];
- long double f = 3.141592653;
- sprintf (buf, "%Lg", f);
- return (strncmp ("3.14159", buf, 7));
-}
+#define _SYSCALL32
+#include <sys/procfs.h>
+int main() {
+pr_sigaction64_t avar
+; return 0; }
EOF
-if { (eval echo configure:7214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- gdb_cv_printf_has_long_double=yes
+if { (eval echo configure:7268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -fr conftest*
- gdb_cv_printf_has_long_double=no
-fi
-rm -fr conftest*
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
+
fi
-
+rm -f conftest*
fi
-if test $gdb_cv_printf_has_long_double = yes; then
- cat >> confdefs.h <<\EOF
-#define PRINTF_HAS_LONG_DOUBLE 1
+ if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_PR_SIGACTION64_T 1
EOF
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
+
+ echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:7290: checking for pr_siginfo64_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 7295 "configure"
+#include "confdefs.h"
+
+#define _SYSCALL32
+#include <sys/procfs.h>
+int main() {
+pr_siginfo64_t avar
+; return 0; }
+EOF
+if { (eval echo configure:7304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
+
+fi
+rm -f conftest*
fi
-echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
+ if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_PR_SIGINFO64_T 1
+EOF
-echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
-echo "configure:7238: checking for long double support in scanf" >&5
-if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
+
+
+
+
+
+ if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
+ echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
+echo "configure:7331: checking whether prfpregset_t type is broken" >&5
+ if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
- gdb_cv_scanf_has_long_double=no
+ gdb_cv_prfpregset_t_broken=yes
else
cat > conftest.$ac_ext <<EOF
-#line 7246 "configure"
+#line 7339 "configure"
#include "confdefs.h"
-
-int main () {
- char *buf = "3.141592653";
- long double f = 0;
- sscanf (buf, "%Lg", &f);
- return !(f > 3.14159 && f < 3.14160);
-}
+#include <sys/procfs.h>
+ int main ()
+ {
+ if (sizeof (prfpregset_t) == sizeof (void *))
+ return 1;
+ return 0;
+ }
EOF
-if { (eval echo configure:7256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:7349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
- gdb_cv_scanf_has_long_double=yes
+ gdb_cv_prfpregset_t_broken=no
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
- gdb_cv_scanf_has_long_double=no
+ gdb_cv_prfpregset_t_broken=yes
fi
rm -fr conftest*
fi
fi
-if test $gdb_cv_scanf_has_long_double = yes; then
- cat >> confdefs.h <<\EOF
-#define SCANF_HAS_LONG_DOUBLE 1
+ echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
+ if test $gdb_cv_prfpregset_t_broken = yes; then
+ cat >> confdefs.h <<\EOF
+#define PRFPREGSET_T_BROKEN 1
EOF
-fi
-echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
+ fi
+ fi
-for ac_hdr in unistd.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7282: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+
+ echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:7374: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7287 "configure"
+#line 7379 "configure"
#include "confdefs.h"
-#include <$ac_hdr>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/procfs.h>
+
+int main() {
+
+ int dummy;;
+ dummy = ioctl(0, PIOCSET, &dummy);
+
+; return 0; }
EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
+if { (eval echo configure:7392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
+ gdb_cv_have_procfs_piocset=yes
else
- echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ gdb_cv_have_procfs_piocset=no
fi
rm -f conftest*
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
+
+ echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
+ if test $gdb_cv_have_procfs_piocset = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_PROCFS_PIOCSET 1
EOF
-
-else
- echo "$ac_t""no" 1>&6
+
+ fi
fi
-done
-for ac_func in getpagesize
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7321: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+if test ${host} = ${target} ; then
+
+ echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
+echo "configure:7416: checking for member l_addr in struct link_map" >&5
+ if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7326 "configure"
+#line 7421 "configure"
#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
+#include <link.h>
int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
+struct link_map lm; (void) lm.l_addr;
; return 0; }
EOF
-if { (eval echo configure:7349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
+ gdb_cv_have_struct_link_map_with_l_members=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+ gdb_cv_have_struct_link_map_with_l_members=no
fi
rm -f conftest*
fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
+ echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
+ if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
EOF
-
+
+ fi
+
+
+ echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
+echo "configure:7450: checking for member lm_addr in struct link_map" >&5
+ if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
else
- echo "$ac_t""no" 1>&6
+ cat > conftest.$ac_ext <<EOF
+#line 7455 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <link.h>
+int main() {
+struct link_map lm; (void) lm.lm_addr;
+; return 0; }
+EOF
+if { (eval echo configure:7463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ gdb_cv_have_struct_link_map_with_lm_members=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gdb_cv_have_struct_link_map_with_lm_members=no
+fi
+rm -f conftest*
fi
-done
-echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:7374: checking for working mmap" >&5
-if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
+ echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
+ if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
+EOF
+
+ fi
+
+
+ echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
+echo "configure:7485: checking for member som_addr in struct so_map" >&5
+ if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$cross_compiling" = yes; then
- ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 7382 "configure"
+#line 7490 "configure"
#include "confdefs.h"
+#include <sys/types.h>
+#ifdef HAVE_NLIST_H
+#include <nlist.h>
+#endif
+#include <link.h>
+int main() {
+struct so_map lm; (void) lm.som_addr;
+; return 0; }
+EOF
+if { (eval echo configure:7501: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ gdb_cv_have_struct_so_map_with_som_members=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gdb_cv_have_struct_so_map_with_som_members=no
+fi
+rm -f conftest*
+fi
-/* Thanks to Mike Haertel and Jim Avera for this test.
- Here is a matrix of mmap possibilities:
- mmap private not fixed
- mmap private fixed at somewhere currently unmapped
- mmap private fixed at somewhere already mapped
- mmap shared not fixed
- mmap shared fixed at somewhere currently unmapped
- mmap shared fixed at somewhere already mapped
- For private mappings, we should verify that changes cannot be read()
- back from the file, nor mmap's back from the file at a different
- address. (There have been systems where private was not correctly
- implemented like the infamous i386 svr4.0, and systems where the
- VM page cache was not coherent with the filesystem buffer cache
- like early versions of FreeBSD and possibly contemporary NetBSD.)
- For shared mappings, we should conversely verify that changes get
- propogated back to all the places they're supposed to be.
+ echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
+ if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
+EOF
- Grep wants private fixed already mapped.
- The main things grep needs to know about mmap are:
- * does it exist and is it safe to write into the mmap'd area
- * how to use it (BSD variants) */
-#include <sys/types.h>
-#include <fcntl.h>
-#include <sys/mman.h>
+ fi
-/* This mess was copied from the GNU getpagesize.h. */
-#ifndef HAVE_GETPAGESIZE
-# ifdef HAVE_UNISTD_H
-# include <unistd.h>
-# endif
+
+ echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
+echo "configure:7523: checking for struct link_map32 in sys/link.h" >&5
+ if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 7528 "configure"
+#include "confdefs.h"
+#define _SYSCALL32
+#include <sys/link.h>
+int main() {
+struct link_map32 l;
+; return 0; }
+EOF
+if { (eval echo configure:7536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ gdb_cv_have_struct_link_map32=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gdb_cv_have_struct_link_map32=no
+fi
+rm -f conftest*
+fi
-/* Assume that all systems that can run configure have sys/param.h. */
-# ifndef HAVE_SYS_PARAM_H
-# define HAVE_SYS_PARAM_H 1
-# endif
+ echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
+ if test $gdb_cv_have_struct_link_map32 = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_STRUCT_LINK_MAP32 1
+EOF
-# ifdef _SC_PAGESIZE
-# define getpagesize() sysconf(_SC_PAGESIZE)
-# else /* no _SC_PAGESIZE */
-# ifdef HAVE_SYS_PARAM_H
-# include <sys/param.h>
-# ifdef EXEC_PAGESIZE
-# define getpagesize() EXEC_PAGESIZE
-# else /* no EXEC_PAGESIZE */
-# ifdef NBPG
-# define getpagesize() NBPG * CLSIZE
-# ifndef CLSIZE
-# define CLSIZE 1
-# endif /* no CLSIZE */
-# else /* no NBPG */
-# ifdef NBPC
-# define getpagesize() NBPC
-# else /* no NBPC */
-# ifdef PAGESIZE
-# define getpagesize() PAGESIZE
-# endif /* PAGESIZE */
-# endif /* no NBPC */
-# endif /* no NBPG */
-# endif /* no EXEC_PAGESIZE */
-# else /* no HAVE_SYS_PARAM_H */
-# define getpagesize() 8192 /* punt totally */
-# endif /* no HAVE_SYS_PARAM_H */
-# endif /* no _SC_PAGESIZE */
+ cat >> confdefs.h <<\EOF
+#define _SYSCALL32 1
+EOF
-#endif /* no HAVE_GETPAGESIZE */
+ fi
+fi
-#ifdef __cplusplus
-extern "C" { void *malloc(unsigned); }
-#else
-char *malloc();
-#endif
-int
-main()
-{
- char *data, *data2, *data3;
- int i, pagesize;
- int fd;
+echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
+echo "configure:7563: checking for long long support in compiler" >&5
+if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 7568 "configure"
+#include "confdefs.h"
- pagesize = getpagesize();
+int main() {
- /*
- * First, make a file with some known garbage in it.
- */
- data = malloc(pagesize);
- if (!data)
- exit(1);
- for (i = 0; i < pagesize; ++i)
- *(data + i) = rand();
- umask(0);
- fd = creat("conftestmmap", 0600);
- if (fd < 0)
- exit(1);
- if (write(fd, data, pagesize) != pagesize)
- exit(1);
- close(fd);
+ extern long long foo;
+ switch (foo & 2) { case 0: return 1; }
- /*
- * Next, try to mmap the file at a fixed address which
- * already has something else allocated at it. If we can,
- * also make sure that we see the same garbage.
- */
- fd = open("conftestmmap", O_RDWR);
- if (fd < 0)
- exit(1);
- data2 = malloc(2 * pagesize);
- if (!data2)
- exit(1);
- data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
- if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_FIXED, fd, 0L))
- exit(1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data2 + i))
- exit(1);
+; return 0; }
+EOF
+if { (eval echo configure:7578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ gdb_cv_c_long_long=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gdb_cv_c_long_long=no
+fi
+rm -f conftest*
+fi
- /*
- * Finally, make sure that changes to the mapped area
- * do not percolate back to the file as seen by read().
- * (This is a bug on some variants of i386 svr4.0.)
- */
- for (i = 0; i < pagesize; ++i)
- *(data2 + i) = *(data2 + i) + 1;
- data3 = malloc(pagesize);
- if (!data3)
- exit(1);
- if (read(fd, data3, pagesize) != pagesize)
- exit(1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data3 + i))
- exit(1);
- close(fd);
- unlink("conftestmmap");
- exit(0);
+echo "$ac_t""$gdb_cv_c_long_long" 1>&6
+if test $gdb_cv_c_long_long = yes; then
+ cat >> confdefs.h <<\EOF
+#define CC_HAS_LONG_LONG 1
+EOF
+
+fi
+
+
+echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
+echo "configure:7600: checking for long long support in printf" >&5
+if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ gdb_cv_printf_has_long_long=no
+else
+ cat > conftest.$ac_ext <<EOF
+#line 7608 "configure"
+#include "confdefs.h"
+
+int main () {
+ char buf[32];
+ long long l = 0;
+ l = (l << 16) + 0x0123;
+ l = (l << 16) + 0x4567;
+ l = (l << 16) + 0x89ab;
+ l = (l << 16) + 0xcdef;
+ sprintf (buf, "0x%016llx", l);
+ return (strcmp ("0x0123456789abcdef", buf));
}
+EOF
+if { (eval echo configure:7622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ gdb_cv_printf_has_long_long=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ gdb_cv_printf_has_long_long=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+if test $gdb_cv_printf_has_long_long = yes; then
+ cat >> confdefs.h <<\EOF
+#define PRINTF_HAS_LONG_LONG 1
+EOF
+
+fi
+echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
+
+
+echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
+echo "configure:7646: checking for long double support in compiler" >&5
+if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 7651 "configure"
+#include "confdefs.h"
+
+int main() {
+long double foo;
+; return 0; }
+EOF
+if { (eval echo configure:7658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_c_long_double=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_c_long_double=no
+fi
+rm -f conftest*
+fi
+echo "$ac_t""$ac_cv_c_long_double" 1>&6
+if test $ac_cv_c_long_double = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_LONG_DOUBLE 1
EOF
-if { (eval echo configure:7522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+
+fi
+
+
+echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
+echo "configure:7680: checking for long double support in printf" >&5
+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 7688 "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
+if { (eval echo configure:7698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
- ac_cv_func_mmap_fixed_mapped=yes
+ gdb_cv_printf_has_long_double=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
- ac_cv_func_mmap_fixed_mapped=no
+ gdb_cv_printf_has_long_double=no
fi
rm -fr conftest*
fi
fi
-echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
-if test $ac_cv_func_mmap_fixed_mapped = yes; then
+if test $gdb_cv_printf_has_long_double = yes; then
cat >> confdefs.h <<\EOF
-#define HAVE_MMAP 1
+#define PRINTF_HAS_LONG_DOUBLE 1
+EOF
+
+fi
+echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
+
+
+echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
+echo "configure:7722: checking for long double support in scanf" >&5
+if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ gdb_cv_scanf_has_long_double=no
+else
+ cat > conftest.$ac_ext <<EOF
+#line 7730 "configure"
+#include "confdefs.h"
+
+int main () {
+ char *buf = "3.141592653";
+ long double f = 0;
+ sscanf (buf, "%Lg", &f);
+ return !(f > 3.14159 && f < 3.14160);
+}
EOF
+if { (eval echo configure:7740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ gdb_cv_scanf_has_long_double=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ gdb_cv_scanf_has_long_double=no
+fi
+rm -fr conftest*
+fi
fi
+if test $gdb_cv_scanf_has_long_double = yes; then
+ cat >> confdefs.h <<\EOF
+#define SCANF_HAS_LONG_DOUBLE 1
+EOF
+
+fi
+echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
case ${host_os} in
aix*)
echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
-echo "configure:7548: checking for -bbigtoc option" >&5
+echo "configure:7765: checking for -bbigtoc option" >&5
if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
cat > conftest.$ac_ext <<EOF
-#line 7562 "configure"
+#line 7779 "configure"
#include "confdefs.h"
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:7569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
:
else
echo "configure: failed program was:" >&5
case ${host_os} in
hpux*)
echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
-echo "configure:7592: checking for HPUX/OSF thread support" >&5
+echo "configure:7809: checking for HPUX/OSF thread support" >&5
if test -f /usr/include/dce/cma_config.h ; then
if test "$GCC" = "yes" ; then
echo "$ac_t""yes" 1>&6
# because version 0 (present on Solaris 2.4 or earlier) doesn't have
# the same API.
echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
-echo "configure:7615: checking for Solaris thread debugging library" >&5
+echo "configure:7832: checking for Solaris thread debugging library" >&5
if test -f /usr/lib/libthread_db.so.1 ; then
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o"
CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:7625: checking for dlopen in -ldl" >&5
+echo "configure:7842: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7633 "configure"
+#line 7850 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
dlopen()
; return 0; }
EOF
-if { (eval echo configure:7644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
# all symbols visible in the dynamic symbol table.
hold_ldflags=$LDFLAGS
echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
-echo "configure:7676: checking for the ld -export-dynamic flag" >&5
+echo "configure:7893: checking for the ld -export-dynamic flag" >&5
LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
cat > conftest.$ac_ext <<EOF
-#line 7679 "configure"
+#line 7896 "configure"
#include "confdefs.h"
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:7686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
found=yes
else
# Sun randomly tweaked the prototypes in <proc_service.h>
# at one point.
echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
-echo "configure:7705: checking if <proc_service.h> is old" >&5
+echo "configure:7922: checking if <proc_service.h> is old" >&5
if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7711 "configure"
+#line 7928 "configure"
#include "confdefs.h"
#include <proc_service.h>
; return 0; }
EOF
-if { (eval echo configure:7722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_proc_service_is_old=no
else
;;
aix*)
echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
-echo "configure:7748: checking for AiX thread debugging library" >&5
+echo "configure:7965: checking for AiX thread debugging library" >&5
if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7753 "configure"
+#line 7970 "configure"
#include "confdefs.h"
#include <sys/pthdebug.h>
int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:7762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_aix_thread_debug=yes
else
if test "x$ac_cv_header_thread_db_h" = "xyes"; then
echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
-echo "configure:7787: checking whether <thread_db.h> has TD_NOTALLOC" >&5
+echo "configure:8004: checking whether <thread_db.h> has TD_NOTALLOC" >&5
if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7792 "configure"
+#line 8009 "configure"
#include "confdefs.h"
#include <thread_db.h>
int main() {
int i = TD_NOTALLOC;
; return 0; }
EOF
-if { (eval echo configure:7799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_thread_db_h_has_td_notalloc=yes
else
save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE"
cat > conftest.$ac_ext <<EOF
-#line 7828 "configure"
+#line 8045 "configure"
#include "confdefs.h"
#include <unistd.h>
int main() {
pread64 (0, NULL, 0, 0);
; return 0; }
EOF
-if { (eval echo configure:7835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ENABLE_CFLAGS="$ENABLE_CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE"
cat >> confdefs.h <<\EOF
if test "x${build_warnings}" != x -a "x$GCC" = xyes
then
echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
-echo "configure:8043: checking compiler warning flags" >&5
+echo "configure:8260: checking compiler warning flags" >&5
# Separate out the -Werror flag as some files just cannot be
# compiled with it enabled.
for w in ${build_warnings}; do
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $w"
cat > conftest.$ac_ext <<EOF
-#line 8053 "configure"
+#line 8270 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:8060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
WARN_CFLAGS="${WARN_CFLAGS} $w"
else
if test $want_included_regex = false; then
echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
-echo "configure:8120: checking for GNU regex" >&5
+echo "configure:8337: checking for GNU regex" >&5
if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8125 "configure"
+#line 8342 "configure"
#include "confdefs.h"
#include <gnu-versions.h>
#include <sys/types.h>
; return 0; }
EOF
-if { (eval echo configure:8137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8354: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_gnu_regex=yes
else
# In the Cygwin environment, we need some additional flags.
echo $ac_n "checking for cygwin""... $ac_c" 1>&6
-echo "configure:8166: checking for cygwin" >&5
+echo "configure:8383: checking for cygwin" >&5
if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8171 "configure"
+#line 8388 "configure"
#include "confdefs.h"
#if defined (__CYGWIN__) || defined (__CYGWIN32__)
else
TERM_LIB=
echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
-echo "configure:8209: checking for tgetent in -lncurses" >&5
+echo "configure:8426: checking for tgetent in -lncurses" >&5
ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lncurses $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 8217 "configure"
+#line 8434 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
tgetent()
; return 0; }
EOF
-if { (eval echo configure:8228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6
-echo "configure:8247: checking for tgetent in -lHcurses" >&5
+echo "configure:8464: checking for tgetent in -lHcurses" >&5
ac_lib_var=`echo Hcurses'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lHcurses $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 8255 "configure"
+#line 8472 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
tgetent()
; return 0; }
EOF
-if { (eval echo configure:8266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6
-echo "configure:8285: checking for tgetent in -ltermlib" >&5
+echo "configure:8502: checking for tgetent in -ltermlib" >&5
ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-ltermlib $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 8293 "configure"
+#line 8510 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
tgetent()
; return 0; }
EOF
-if { (eval echo configure:8304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
-echo "configure:8323: checking for tgetent in -ltermcap" >&5
+echo "configure:8540: checking for tgetent in -ltermcap" >&5
ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-ltermcap $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 8331 "configure"
+#line 8548 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
tgetent()
; return 0; }
EOF
-if { (eval echo configure:8342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
-echo "configure:8361: checking for tgetent in -lcurses" >&5
+echo "configure:8578: checking for tgetent in -lcurses" >&5
ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lcurses $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 8369 "configure"
+#line 8586 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
tgetent()
; return 0; }
EOF
-if { (eval echo configure:8380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6
-echo "configure:8399: checking for tgetent in -lterminfo" >&5
+echo "configure:8616: checking for tgetent in -lterminfo" >&5
ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lterminfo $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 8407 "configure"
+#line 8624 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
tgetent()
; return 0; }
EOF
-if { (eval echo configure:8418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:8583: checking for Tcl configuration" >&5
+echo "configure:8800: checking for Tcl configuration" >&5
if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
-echo "configure:8691: checking for Tk configuration" >&5
+echo "configure:8908: checking for Tk configuration" >&5
if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
no_tcl=true
echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
-echo "configure:8800: checking for Tcl private headers. dir=${configdir}" >&5
+echo "configure:9017: checking for Tcl private headers. dir=${configdir}" >&5
# Check whether --with-tclinclude or --without-tclinclude was given.
if test "${with_tclinclude+set}" = set; then
withval="$with_tclinclude"
if test x"${ac_cv_c_tclh}" = x ; then
ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
-echo "configure:8866: checking for tclInt.h" >&5
+echo "configure:9083: checking for tclInt.h" >&5
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 8871 "configure"
+#line 9088 "configure"
#include "confdefs.h"
#include <tclInt.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
#
no_tk=true
echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
-echo "configure:8936: checking for Tk private headers" >&5
+echo "configure:9153: checking for Tk private headers" >&5
# Check whether --with-tkinclude or --without-tkinclude was given.
if test "${with_tkinclude+set}" = set; then
withval="$with_tkinclude"
if test x"${ac_cv_c_tkh}" = x ; then
ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for tk.h""... $ac_c" 1>&6
-echo "configure:9002: checking for tk.h" >&5
+echo "configure:9219: checking for tk.h" >&5
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 9007 "configure"
+#line 9224 "configure"
#include "confdefs.h"
#include <tk.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9012: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:9058: checking for Itcl private headers. srcdir=${srcdir}" >&5
+echo "configure:9275: checking for Itcl private headers. srcdir=${srcdir}" >&5
if test x"${ac_cv_c_itclh}" = x ; then
for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
if test -f $i/generic/itcl.h ; then
echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:9081: checking for Itk private headers. srcdir=${srcdir}" >&5
+echo "configure:9298: checking for Itk private headers. srcdir=${srcdir}" >&5
if test x"${ac_cv_c_itkh}" = x ; then
for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
if test -f $i/generic/itk.h ; then
fi
echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
-echo "configure:9136: checking for Itcl configuration" >&5
+echo "configure:9353: checking for Itcl configuration" >&5
if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
-echo "configure:9239: checking for Itk configuration" >&5
+echo "configure:9456: checking for Itk configuration" >&5
if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:9383: checking for X" >&5
+echo "configure:9600: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 9445 "configure"
+#line 9662 "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:9450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9667: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
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 9519 "configure"
+#line 9736 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:9526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
# ``gdbserver'' can only be built in a native configuration.
if test x"${target}" = x"${host}"; then
echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
-echo "configure:9818: checking whether gdbserver is supported on this host" >&5
+echo "configure:10035: checking whether gdbserver is supported on this host" >&5
if test x"${build_gdbserver}" = xyes ; then
configdirs="${configdirs} gdbserver"
SUBDIRS="${SUBDIRS} gdbserver"
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:9882: checking for Cygwin environment" >&5
+echo "configure:10099: checking for Cygwin environment" >&5
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 9887 "configure"
+#line 10104 "configure"
#include "confdefs.h"
int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:9898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:9915: checking for mingw32 environment" >&5
+echo "configure:10132: checking for mingw32 environment" >&5
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 9920 "configure"
+#line 10137 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:9927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:9946: checking for executable suffix" >&5
+echo "configure:10163: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:9956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:10173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.C | *.o | *.obj | *.ilk | *.pdb) ;;
echo $ac_n "checking for iconv""... $ac_c" 1>&6
-echo "configure:9998: checking for iconv" >&5
+echo "configure:10215: checking for iconv" >&5
if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no
cat > conftest.$ac_ext <<EOF
-#line 10006 "configure"
+#line 10223 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
iconv_close(cd);
; return 0; }
EOF
-if { (eval echo configure:10016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_func_iconv=yes
else
am_save_LIBS="$LIBS"
LIBS="$LIBS -liconv"
cat > conftest.$ac_ext <<EOF
-#line 10028 "configure"
+#line 10245 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
iconv_close(cd);
; return 0; }
EOF
-if { (eval echo configure:10038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_lib_iconv=yes
am_cv_func_iconv=yes
EOF
echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
-echo "configure:10059: checking for iconv declaration" >&5
+echo "configure:10276: checking for iconv declaration" >&5
if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 10065 "configure"
+#line 10282 "configure"
#include "confdefs.h"
#include <stdlib.h>
; return 0; }
EOF
-if { (eval echo configure:10084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
am_cv_proto_iconv_arg1=""
else