1##*****************************************************************************
2#  AUTHOR:
3#    Morris Jette <jette1@llnl.gov>
4#
5#  SYNOPSIS:
6#    X_AC_PTRACE
7#
8#  DESCRIPTION:
9#    Test argument count of ptrace function.
10#
11#  WARNINGS:
12#    This macro must be placed after AC_PROG_CC or equivalent.
13##*****************************************************************************
14
15AC_DEFUN([X_AC_PTRACE], [
16  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/reg.h>
17    #include <sys/ptrace.h>
18    #include <sys/ldr.h>]], [[ptrace(PT_TRACE_ME,0,0,0,0);]])],[AC_DEFINE(PTRACE_FIVE_ARGS, 1,
19             [Define to 1 if ptrace takes five arguments.])],[])
20
21  AC_CHECK_FUNCS(ptrace64, [], [])
22])
23
24