* acconfig.h (HAVE_STRUCT_REG_R_FS, HAVE_STRUCT_R_GS): Remove

undefs.
* configure.ac: Use AC_CHECK_MEMBERS to check whether `struct
thread' has a td_pcb member and whether `struct reg' has r_fs and
r_gs members.
* configure, config.in: Regenerate.
This commit is contained in:
Mark Kettenis 2005-01-21 13:49:22 +00:00
parent b8667b6191
commit 5c45e068d7
5 changed files with 214 additions and 65 deletions

View File

@ -1,3 +1,12 @@
2005-01-21 Mark Kettenis <kettenis@gnu.org>
* acconfig.h (HAVE_STRUCT_REG_R_FS, HAVE_STRUCT_R_GS): Remove
undefs.
* configure.ac: Use AC_CHECK_MEMBERS to check whether `struct
thread' has a td_pcb member and whether `struct reg' has r_fs and
r_gs members.
* configure, config.in: Regenerate.
2005-01-21 Mark Kettenis <kettenis@gnu.org> 2005-01-21 Mark Kettenis <kettenis@gnu.org>
* configure.ac: Remove ia64-*-aix* junk. * configure.ac: Remove ia64-*-aix* junk.

View File

@ -3,12 +3,6 @@
# undef _GNU_SOURCE # undef _GNU_SOURCE
#endif #endif
/* Define if your struct reg has r_fs. */
#undef HAVE_STRUCT_REG_R_FS
/* Define if your struct reg has r_gs. */
#undef HAVE_STRUCT_REG_R_GS
/* Define if pstatus_t type is available */ /* Define if pstatus_t type is available */
#undef HAVE_PSTATUS_T #undef HAVE_PSTATUS_T

View File

@ -4,12 +4,6 @@
# undef _GNU_SOURCE # undef _GNU_SOURCE
#endif #endif
/* Define if your struct reg has r_fs. */
#undef HAVE_STRUCT_REG_R_FS
/* Define if your struct reg has r_gs. */
#undef HAVE_STRUCT_REG_R_GS
/* Define if pstatus_t type is available */ /* Define if pstatus_t type is available */
#undef HAVE_PSTATUS_T #undef HAVE_PSTATUS_T
@ -457,10 +451,16 @@
/* Define to 1 if your system has struct reg in <machine/reg.h>. */ /* Define to 1 if your system has struct reg in <machine/reg.h>. */
#undef HAVE_STRUCT_REG #undef HAVE_STRUCT_REG
/* Define to 1 if `r_fs' is member of `struct reg'. */
#undef HAVE_STRUCT_REG_R_FS
/* Define to 1 if `r_gs' is member of `struct reg'. */
#undef HAVE_STRUCT_REG_R_GS
/* Define to 1 if `st_blocks' is member of `struct stat'. */ /* Define to 1 if `st_blocks' is member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_BLOCKS #undef HAVE_STRUCT_STAT_ST_BLOCKS
/* Define to 1 if your system has td_pcb in struct thread. */ /* Define to 1 if `td_pcb' is member of `struct thread'. */
#undef HAVE_STRUCT_THREAD_TD_PCB #undef HAVE_STRUCT_THREAD_TD_PCB
/* Define to 1 if you have the `syscall' function. */ /* Define to 1 if you have the `syscall' function. */

222
gdb/configure vendored
View File

@ -16746,10 +16746,10 @@ _ACEOF
fi fi
# See if <sys/proc.h> defines `struct thread' with a td_pcb member. # Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
echo "$as_me:$LINENO: checking for td_pcb in struct thread" >&5 echo "$as_me:$LINENO: checking for struct thread.td_pcb" >&5
echo $ECHO_N "checking for td_pcb in struct thread... $ECHO_C" >&6 echo $ECHO_N "checking for struct thread.td_pcb... $ECHO_C" >&6
if test "${gdb_cv_struct_thread_td_pcb+set}" = set; then if test "${ac_cv_member_struct_thread_td_pcb+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6 echo $ECHO_N "(cached) $ECHO_C" >&6
else else
cat >conftest.$ac_ext <<_ACEOF cat >conftest.$ac_ext <<_ACEOF
@ -16760,10 +16760,14 @@ cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */ /* end confdefs.h. */
#include <sys/param.h> #include <sys/param.h>
#include <sys/proc.h> #include <sys/proc.h>
int int
main () main ()
{ {
struct thread td; td.td_pcb; static struct thread ac_aggr;
if (ac_aggr.td_pcb)
return 0;
; ;
return 0; return 0;
} }
@ -16790,25 +16794,76 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$? ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then (exit $ac_status); }; }; then
gdb_cv_struct_thread_td_pcb=yes ac_cv_member_struct_thread_td_pcb=yes
else else
echo "$as_me: failed program was:" >&5 echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5 sed 's/^/| /' conftest.$ac_ext >&5
gdb_cv_struct_thread_td_pcb=no cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <sys/param.h>
#include <sys/proc.h>
int
main ()
{
static struct thread ac_aggr;
if (sizeof ac_aggr.td_pcb)
return 0;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_member_struct_thread_td_pcb=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_member_struct_thread_td_pcb=no
fi fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi fi
echo "$as_me:$LINENO: result: $gdb_cv_struct_thread_td_pcb" >&5 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "${ECHO_T}$gdb_cv_struct_thread_td_pcb" >&6 fi
if test $gdb_cv_struct_thread_td_pcb = yes; then echo "$as_me:$LINENO: result: $ac_cv_member_struct_thread_td_pcb" >&5
echo "${ECHO_T}$ac_cv_member_struct_thread_td_pcb" >&6
if test $ac_cv_member_struct_thread_td_pcb = yes; then
cat >>confdefs.h <<\_ACEOF cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_THREAD_TD_PCB 1 #define HAVE_STRUCT_THREAD_TD_PCB 1
_ACEOF _ACEOF
fi fi
# See if <sys/lwp.h> defines `struct lwp`. # See if <sys/lwp.h> defines `struct lwp`.
echo "$as_me:$LINENO: checking for struct lwp" >&5 echo "$as_me:$LINENO: checking for struct lwp" >&5
echo $ECHO_N "checking for struct lwp... $ECHO_C" >&6 echo $ECHO_N "checking for struct lwp... $ECHO_C" >&6
@ -16937,9 +16992,9 @@ fi
# See if <machine/reg.h> supports the %fs and %gs i386 segment registers. # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
echo "$as_me:$LINENO: checking for r_fs in struct reg" >&5 echo "$as_me:$LINENO: checking for struct reg.r_fs" >&5
echo $ECHO_N "checking for r_fs in struct reg... $ECHO_C" >&6 echo $ECHO_N "checking for struct reg.r_fs... $ECHO_C" >&6
if test "${gdb_cv_struct_reg_r_fs+set}" = set; then if test "${ac_cv_member_struct_reg_r_fs+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6 echo $ECHO_N "(cached) $ECHO_C" >&6
else else
cat >conftest.$ac_ext <<_ACEOF cat >conftest.$ac_ext <<_ACEOF
@ -16949,10 +17004,13 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */ /* end confdefs.h. */
#include <machine/reg.h> #include <machine/reg.h>
int int
main () main ()
{ {
struct reg r; r.r_fs; static struct reg ac_aggr;
if (ac_aggr.r_fs)
return 0;
; ;
return 0; return 0;
} }
@ -16979,26 +17037,75 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$? ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then (exit $ac_status); }; }; then
gdb_cv_struct_reg_r_fs=yes ac_cv_member_struct_reg_r_fs=yes
else else
echo "$as_me: failed program was:" >&5 echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5 sed 's/^/| /' conftest.$ac_ext >&5
gdb_cv_struct_reg_r_fs=no cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <machine/reg.h>
int
main ()
{
static struct reg ac_aggr;
if (sizeof ac_aggr.r_fs)
return 0;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_member_struct_reg_r_fs=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_member_struct_reg_r_fs=no
fi fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi fi
echo "$as_me:$LINENO: result: $gdb_cv_struct_reg_r_fs" >&5 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "${ECHO_T}$gdb_cv_struct_reg_r_fs" >&6 fi
if test $gdb_cv_struct_reg_r_fs = yes; then echo "$as_me:$LINENO: result: $ac_cv_member_struct_reg_r_fs" >&5
cat >>confdefs.h <<\_ACEOF echo "${ECHO_T}$ac_cv_member_struct_reg_r_fs" >&6
if test $ac_cv_member_struct_reg_r_fs = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_REG_R_FS 1 #define HAVE_STRUCT_REG_R_FS 1
_ACEOF _ACEOF
fi fi
echo "$as_me:$LINENO: checking for r_gs in struct reg" >&5 echo "$as_me:$LINENO: checking for struct reg.r_gs" >&5
echo $ECHO_N "checking for r_gs in struct reg... $ECHO_C" >&6 echo $ECHO_N "checking for struct reg.r_gs... $ECHO_C" >&6
if test "${gdb_cv_struct_reg_r_gs+set}" = set; then if test "${ac_cv_member_struct_reg_r_gs+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6 echo $ECHO_N "(cached) $ECHO_C" >&6
else else
cat >conftest.$ac_ext <<_ACEOF cat >conftest.$ac_ext <<_ACEOF
@ -17008,10 +17115,13 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */ /* end confdefs.h. */
#include <machine/reg.h> #include <machine/reg.h>
int int
main () main ()
{ {
struct reg r; r.r_gs; static struct reg ac_aggr;
if (ac_aggr.r_gs)
return 0;
; ;
return 0; return 0;
} }
@ -17038,24 +17148,74 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$? ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then (exit $ac_status); }; }; then
gdb_cv_struct_reg_r_gs=yes ac_cv_member_struct_reg_r_gs=yes
else else
echo "$as_me: failed program was:" >&5 echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5 sed 's/^/| /' conftest.$ac_ext >&5
gdb_cv_struct_reg_r_gs=no cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <machine/reg.h>
int
main ()
{
static struct reg ac_aggr;
if (sizeof ac_aggr.r_gs)
return 0;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_member_struct_reg_r_gs=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_member_struct_reg_r_gs=no
fi fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi fi
echo "$as_me:$LINENO: result: $gdb_cv_struct_reg_r_gs" >&5 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "${ECHO_T}$gdb_cv_struct_reg_r_gs" >&6 fi
if test $gdb_cv_struct_reg_r_gs = yes; then echo "$as_me:$LINENO: result: $ac_cv_member_struct_reg_r_gs" >&5
cat >>confdefs.h <<\_ACEOF echo "${ECHO_T}$ac_cv_member_struct_reg_r_gs" >&6
if test $ac_cv_member_struct_reg_r_gs = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_REG_R_GS 1 #define HAVE_STRUCT_REG_R_GS 1
_ACEOF _ACEOF
fi fi
# See if <sys/ptrace.h> provides the PTRACE_GETREGS request. # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
echo "$as_me:$LINENO: checking for PTRACE_GETREGS" >&5 echo "$as_me:$LINENO: checking for PTRACE_GETREGS" >&5
echo $ECHO_N "checking for PTRACE_GETREGS... $ECHO_C" >&6 echo $ECHO_N "checking for PTRACE_GETREGS... $ECHO_C" >&6

View File

@ -589,15 +589,11 @@ if test "$gdb_with_regex" = yes; then
[Define to 1 if the regex included in libiberty should be used.]) [Define to 1 if the regex included in libiberty should be used.])
fi fi
# See if <sys/proc.h> defines `struct thread' with a td_pcb member. # Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
AC_CACHE_CHECK([for td_pcb in struct thread], gdb_cv_struct_thread_td_pcb, AC_CHECK_MEMBERS([struct thread.td_pcb], [], [],
[AC_TRY_COMPILE([#include <sys/param.h> [#include <sys/param.h>
#include <sys/proc.h>], [struct thread td; td.td_pcb;], #include <sys/proc.h>
gdb_cv_struct_thread_td_pcb=yes, gdb_cv_struct_thread_td_pcb=no)]) ])
if test $gdb_cv_struct_thread_td_pcb = yes; then
AC_DEFINE(HAVE_STRUCT_THREAD_TD_PCB, 1,
[Define to 1 if your system has td_pcb in struct thread.])
fi
# See if <sys/lwp.h> defines `struct lwp`. # See if <sys/lwp.h> defines `struct lwp`.
AC_CACHE_CHECK([for struct lwp], gdb_cv_struct_lwp, AC_CACHE_CHECK([for struct lwp], gdb_cv_struct_lwp,
@ -621,18 +617,8 @@ fi
# See if <machine/reg.h> supports the %fs and %gs i386 segment registers. # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
AC_CACHE_CHECK([for r_fs in struct reg], gdb_cv_struct_reg_r_fs, AC_CHECK_MEMBERS([struct reg.r_fs, struct reg.r_gs], [], [],
[AC_TRY_COMPILE([#include <machine/reg.h>], [struct reg r; r.r_fs;], [#include <machine/reg.h>])
gdb_cv_struct_reg_r_fs=yes, gdb_cv_struct_reg_r_fs=no)])
if test $gdb_cv_struct_reg_r_fs = yes; then
AC_DEFINE(HAVE_STRUCT_REG_R_FS)
fi
AC_CACHE_CHECK([for r_gs in struct reg], gdb_cv_struct_reg_r_gs,
[AC_TRY_COMPILE([#include <machine/reg.h>], [struct reg r; r.r_gs;],
gdb_cv_struct_reg_r_gs=yes, gdb_cv_struct_reg_r_gs=no)])
if test $gdb_cv_struct_reg_r_gs = yes; then
AC_DEFINE(HAVE_STRUCT_REG_R_GS)
fi
# See if <sys/ptrace.h> provides the PTRACE_GETREGS request. # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
AC_MSG_CHECKING(for PTRACE_GETREGS) AC_MSG_CHECKING(for PTRACE_GETREGS)