x_ac_ptrace.m4 696 B

123456789101112131415161718192021222324
  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. AC_DEFUN([X_AC_PTRACE], [
  15. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/reg.h>
  16. #include <sys/ptrace.h>
  17. #include <sys/ldr.h>]], [[ptrace(PT_TRACE_ME,0,0,0,0);]])],[AC_DEFINE(PTRACE_FIVE_ARGS, 1,
  18. [Define to 1 if ptrace takes five arguments.])],[])
  19. AC_CHECK_FUNCS(ptrace64, [], [])
  20. ])