From 97bf5e38c3229ad1965e2839055a7c6baf6a3506 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Thu, 2 Jan 2003 11:45:34 +0000 Subject: [PATCH] * configure.in: Reorganize "Checks for library functions section" a bit. Remove check for `btowc' and `isascii' functions. * configure: Regenerated. --- gdb/ChangeLog | 4 + gdb/configure | 3109 +++++++++++++++++++++++++++++------------------------- gdb/configure.in | 15 +- 3 files changed, 1675 insertions(+), 1453 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4ab3578..57aff39 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2003-01-02 Mark Kettenis + * configure.in: Reorganize "Checks for library functions section" + a bit. Remove check for `btowc' and `isascii' functions. + * configure: Regenerated. + * acconfig.h (_MSE_INT_H): Remove. * configure.in: Create "Checks for header files" section, and move appropriate tests there. Don't check for objlist.h, wchar.h, diff --git a/gdb/configure b/gdb/configure index b0241e6..0ddc959 100755 --- a/gdb/configure +++ b/gdb/configure @@ -4984,78 +4984,22 @@ esac # 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 < -/* 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 <&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 < 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 @@ -5076,12 +5020,12 @@ EOF 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 <&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 @@ -5141,12 +5085,12 @@ EOF 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 <&6 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 <&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 @@ -5226,7 +5170,7 @@ done 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 @@ -5234,7 +5178,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&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 @@ -5274,52 +5218,21 @@ EOF 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 < -#if STDC_HEADERS -#include -#include -#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 < +#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* @@ -5335,535 +5248,549 @@ rm -f 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 <&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 < /* 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 <&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 < + +/* 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 -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_VFORK_H -#include -#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 , - but some compilers (e.g. gcc -O) don't grok . - Test for this by using a static variable whose address - is put into a register that is clobbered by the vfork. */ -static +#include +#include + +/* This mess was copied from the GNU getpagesize.h. */ +#ifndef HAVE_GETPAGESIZE +# ifdef HAVE_UNISTD_H +# include +# 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 +# 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 < +#include +#if STDC_HEADERS +#include +#include #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 < - -int main() { - - if (setpgrp(1,1) == -1) - exit (0); - else - exit (1); - -; return 0; } +#include 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 < +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char vfork(); below. */ +#include +/* 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 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 < -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 +#include +#include +#ifdef HAVE_UNISTD_H +#include +#endif +#ifdef HAVE_VFORK_H +#include +#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 , + but some compilers (e.g. gcc -O) don't grok . + 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 < -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 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 < -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 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 < -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 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 < -#include -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 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 < -#include +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include +/* 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 <&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 <&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 @@ -5910,1641 +5837,1931 @@ 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 < +/* 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 -#ifdef HAVE_STRING_H -#include +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 -#endif -#endif -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include +$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 <&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 < +/* 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 -#ifdef HAVE_STRING_H -#include +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 -#endif -#endif -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include +$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 <&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 < +/* 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 -#ifdef HAVE_STRING_H -#include +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 -#endif -#endif -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include +$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 <&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 < +/* 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 -#ifdef HAVE_STRING_H -#include +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 -#endif -#endif -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include +$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 <&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 < -#ifdef HAVE_STRING_H -#include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif -#ifdef HAVE_STDLIB_H -#include -#endif #ifdef HAVE_UNISTD_H #include #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 < -#ifdef HAVE_STRING_H -#include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_UNISTD_H #include -#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 < -#ifdef HAVE_STRING_H -#include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif +#include + 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 < 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 < +#include +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 <&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 < +#include +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 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 < +#include 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 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 < +#include 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 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 < +#include +#include 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 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 < +#include +#include 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 < +#include +#ifdef HAVE_STRING_H +#include +#else +#ifdef HAVE_STRINGS_H +#include +#endif +#endif +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#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 < +#include +#ifdef HAVE_STRING_H +#include +#else +#ifdef HAVE_STRINGS_H +#include +#endif +#endif +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#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 < +#include +#ifdef HAVE_STRING_H +#include +#else +#ifdef HAVE_STRINGS_H +#include +#endif +#endif +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#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 < +#include +#ifdef HAVE_STRING_H +#include +#else +#ifdef HAVE_STRINGS_H +#include +#endif +#endif +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#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 < +#include +#ifdef HAVE_STRING_H +#include +#else +#ifdef HAVE_STRINGS_H +#include +#endif +#endif +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#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 < +#include +#ifdef HAVE_STRING_H +#include +#else +#ifdef HAVE_STRINGS_H +#include +#endif +#endif +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#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 < +#include +#ifdef HAVE_STRING_H +#include +#else +#ifdef HAVE_STRINGS_H +#include +#endif +#endif +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#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 +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 +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 < 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 < 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 < 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 < - 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 < -#include -#include +#define _SYSCALL32 +#include 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 < + +#define _SYSCALL32 +#include 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 < -#include + +#define _SYSCALL32 +#include 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 < -#ifdef HAVE_NLIST_H -#include -#endif -#include + +#define _SYSCALL32 +#include 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 < +#include 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 < 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 < +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 < 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 < +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 < +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 < 3.14159 && f < 3.14160); -} +#include + 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 < +#include +#include +#include + +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 <&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 < -/* 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 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 <&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 < +#include +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 < +#ifdef HAVE_NLIST_H +#include +#endif +#include +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 -#include -#include + fi -/* This mess was copied from the GNU getpagesize.h. */ -#ifndef HAVE_GETPAGESIZE -# ifdef HAVE_UNISTD_H -# include -# 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 < +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 -# 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 <&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 <&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 <&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 <&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 < 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 @@ -7558,14 +7775,14 @@ else LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc cat > conftest.$ac_ext <&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 @@ -7588,7 +7805,7 @@ if test ${build} = ${host} -a ${host} = ${target} ; then 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 @@ -7611,7 +7828,7 @@ EOF # 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 @@ -7621,7 +7838,7 @@ 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 @@ -7629,7 +7846,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&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 @@ -7672,17 +7889,17 @@ fi # 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 <&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 @@ -7701,13 +7918,13 @@ rm -f conftest* # Sun randomly tweaked the prototypes in # at one point. echo $ac_n "checking if is old""... $ac_c" 1>&6 -echo "configure:7705: checking if is old" >&5 +echo "configure:7922: checking if 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 < @@ -7718,7 +7935,7 @@ int main() { ; 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 @@ -7744,12 +7961,12 @@ EOF ;; 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 < int main() { @@ -7758,7 +7975,7 @@ 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 @@ -7783,19 +8000,19 @@ fi if test "x$ac_cv_header_thread_db_h" = "xyes"; then echo $ac_n "checking whether has TD_NOTALLOC""... $ac_c" 1>&6 -echo "configure:7787: checking whether has TD_NOTALLOC" >&5 +echo "configure:8004: checking whether 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 < 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 @@ -7824,14 +8041,14 @@ if test $host = $target; then save_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE" cat > conftest.$ac_ext < 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 @@ -8039,7 +8256,7 @@ WERROR_CFLAGS="" 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 @@ -8049,14 +8266,14 @@ echo "configure:8043: checking compiler warning flags" >&5 saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $w" cat > conftest.$ac_ext <&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 @@ -8116,12 +8333,12 @@ fi 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 < #include @@ -8133,7 +8350,7 @@ int main() { ; 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 @@ -8162,12 +8379,12 @@ fi # 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 <&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 @@ -8213,7 +8430,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&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 @@ -8243,7 +8460,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then 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 @@ -8251,7 +8468,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lHcurses $LIBS" cat > conftest.$ac_ext <&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 @@ -8281,7 +8498,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then 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 @@ -8289,7 +8506,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermlib $LIBS" cat > conftest.$ac_ext <&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 @@ -8319,7 +8536,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then 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 @@ -8327,7 +8544,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <&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 @@ -8357,7 +8574,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then 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 @@ -8365,7 +8582,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcurses $LIBS" cat > conftest.$ac_ext <&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 @@ -8395,7 +8612,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then 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 @@ -8403,7 +8620,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lterminfo $LIBS" cat > conftest.$ac_ext <&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 @@ -8579,7 +8796,7 @@ if test "${with_tclconfig+set}" = set; then 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 @@ -8687,7 +8904,7 @@ if test "${with_tkconfig+set}" = set; then 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 @@ -8796,7 +9013,7 @@ fi 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" @@ -8862,17 +9079,17 @@ fi 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 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* @@ -8932,7 +9149,7 @@ fi # 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" @@ -8998,17 +9215,17 @@ fi 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 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* @@ -9054,7 +9271,7 @@ fi 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 @@ -9077,7 +9294,7 @@ fi 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 @@ -9132,7 +9349,7 @@ if test "${with_itclconfig+set}" = set; 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 @@ -9235,7 +9452,7 @@ if test "${with_itkconfig+set}" = set; then 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 @@ -9379,7 +9596,7 @@ fi # 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 @@ -9441,12 +9658,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < 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* @@ -9515,14 +9732,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&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. @@ -9814,7 +10031,7 @@ fi # ``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" @@ -9878,12 +10095,12 @@ fi 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 <&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 @@ -9911,19 +10128,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6 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 <&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 @@ -9942,7 +10159,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes 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 @@ -9952,7 +10169,7 @@ 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) ;; @@ -9994,7 +10211,7 @@ fi 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 @@ -10002,7 +10219,7 @@ else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat > conftest.$ac_ext < #include @@ -10012,7 +10229,7 @@ iconv_t cd = iconv_open("",""); 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 @@ -10024,7 +10241,7 @@ rm -f conftest* am_save_LIBS="$LIBS" LIBS="$LIBS -liconv" cat > conftest.$ac_ext < #include @@ -10034,7 +10251,7 @@ iconv_t cd = iconv_open("",""); 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 @@ -10055,13 +10272,13 @@ echo "$ac_t""$am_cv_func_iconv" 1>&6 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 < @@ -10080,7 +10297,7 @@ int main() { ; 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 diff --git a/gdb/configure.in b/gdb/configure.in index fb3d1ff..48f5b45 100644 --- a/gdb/configure.in +++ b/gdb/configure.in @@ -204,10 +204,16 @@ AC_C_INLINE # Checks for library functions. # # ------------------------------ # -AC_CHECK_FUNCS(btowc canonicalize_file_name isascii poll \ - realpath sbrk setpgid setpgrp sigaction sigprocmask sigsetmask ) AC_FUNC_ALLOCA +AC_FUNC_MMAP AC_FUNC_VFORK +AC_CHECK_FUNCS(canonicalize_file_name realpath) +AC_CHECK_FUNCS(poll) +AC_CHECK_FUNCS(sbrk) +AC_CHECK_FUNCS(setpgid setpgrp) +AC_CHECK_FUNCS(sigaction sigprocmask, sigsetmask) +AC_CHECK_FUNCS(socketpair) + dnl AC_FUNC_SETPGRP does not work when cross compiling dnl Instead, assume we will have a prototype for setpgrp if cross compiling. if test "$cross_compiling" = no; then @@ -304,9 +310,6 @@ if test $gdb_cv_have_pt_getxmmregs = yes; then fi -AC_CHECK_FUNCS(socketpair) - - BFD_NEED_DECLARATION(malloc) BFD_NEED_DECLARATION(realloc) BFD_NEED_DECLARATION(free) @@ -572,8 +575,6 @@ if test $gdb_cv_scanf_has_long_double = yes; then fi AC_MSG_RESULT($gdb_cv_scanf_has_long_double) -AC_FUNC_MMAP - case ${host_os} in aix*) AC_CACHE_CHECK([for -bbigtoc option], [gdb_cv_bigtoc], [ -- 2.7.4