else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-$gdb_ptrace_headers
+ $gdb_ptrace_headers
int
main ()
{
extern long ptrace (enum __ptrace_request, ...);
+
;
return 0;
}
main ()
{
extern int ptrace ();
+
;
return 0;
}
main ()
{
extern long ptrace (enum __ptrace_request, ...);
+
;
return 0;
}
main ()
{
extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
+
;
return 0;
}
main ()
{
extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
+
;
return 0;
}
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-$gdb_ptrace_headers
+ $gdb_ptrace_headers
int
main ()
{
extern long ptrace (enum __ptrace_request, ...);
+
;
return 0;
}
main ()
{
extern int ptrace ();
+
;
return 0;
}
main ()
{
extern long ptrace (enum __ptrace_request, ...);
+
;
return 0;
}
main ()
{
extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
+
;
return 0;
}
main ()
{
extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
+
;
return 0;
}
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-$gdb_ptrace_headers
+ $gdb_ptrace_headers
int
main ()
{
extern long ptrace (enum __ptrace_request, ...);
+
;
return 0;
}
main ()
{
extern int ptrace ();
+
;
return 0;
}
main ()
{
extern long ptrace (enum __ptrace_request, ...);
+
;
return 0;
}
main ()
{
extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
+
;
return 0;
}
main ()
{
extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
+
;
return 0;
}
AC_CACHE_CHECK(
[return type of ptrace],
[gdb_cv_func_ptrace_ret],
- [AC_TRY_COMPILE(
- [$gdb_ptrace_headers],
- [extern long ptrace (enum __ptrace_request, ...);],
- [gdb_cv_func_ptrace_ret='long'],
- [AC_TRY_COMPILE(
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
[$gdb_ptrace_headers],
- [extern int ptrace ();],
+ [extern long ptrace (enum __ptrace_request, ...);]
+ )],
+ [gdb_cv_func_ptrace_ret='long'],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [$gdb_ptrace_headers],
+ [extern int ptrace ();]
+ )],
[gdb_cv_func_ptrace_ret='int'],
[gdb_cv_func_ptrace_ret='long']
)]
AC_CACHE_CHECK(
[types of arguments for ptrace],
[gdb_cv_func_ptrace_args],
- [AC_TRY_COMPILE(
- [$gdb_ptrace_headers],
- [extern long ptrace (enum __ptrace_request, ...);],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [$gdb_ptrace_headers],
+ [extern long ptrace (enum __ptrace_request, ...);]
+ )],
[gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'],
[for gdb_arg1 in 'int' 'long'; do
for gdb_arg2 in 'pid_t' 'int' 'long'; do
for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
for gdb_arg4 in 'int' 'long' 'void *'; do
- AC_TRY_COMPILE(
- [$gdb_ptrace_headers],
- [extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);],
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [$gdb_ptrace_headers],
+ [extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);]
+ )],
[gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
break 4;]
)
for gdb_arg5 in 'int *' 'int' 'long'; do
- AC_TRY_COMPILE(
- [$gdb_ptrace_headers],
- [extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);],
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [$gdb_ptrace_headers],
+ [extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);]
+ )],
[gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
break 5;]
)