5 dnl Process this file with autoconf to produce a configure script.
7 -AC_INIT([psmisc],[22.12])
8 +AC_INIT([psmisc],[22.12])
9 AC_CONFIG_SRCDIR([src/comm.h])
10 AC_CONFIG_HEADER([config.h])
11 AC_CONFIG_AUX_DIR([config])
12 @@ -56,6 +56,12 @@ AC_TYPE_PID_T
14 AC_CHECK_MEMBERS([struct stat.st_rdev])
17 +dnl Check for language stuff
18 +AM_GNU_GETTEXT([external])
19 +AM_GNU_GETTEXT_VERSION([0.16.1])
21 +dnl Must be after the gettext stuff as it sets build_cpu
22 AC_CHECK_MEMBERS([struct user_regs_struct.orig_eax,
23 struct user_regs_struct.eax,
24 struct user_regs_struct.ebx,
25 @@ -66,11 +72,13 @@ AC_CHECK_MEMBERS([struct user_regs_struct.orig_eax,
26 struct user_regs_struct.rdi,
27 struct user_regs_struct.rsi,
28 struct user_regs_struct.rdx], [],[],
29 - [#include <sys/user.h>])
30 + [#include <bits/types.h>
31 + #include <sys/user.h>])
32 AC_CHECK_MEMBERS([struct pt_regs.orig_gpr3,
33 struct pt_regs.gpr], [],[], [#include <linux/ptrace.h>])
34 AC_CHECK_MEMBERS([struct pt_regs.uregs],[],[], [#include <asm/ptrace.h>])
35 -AC_CHECK_MEMBERS([struct pt_regs.regs],[],[], [#include <asm/ptrace.h>])
36 +AC_CHECK_MEMBERS([struct pt_regs.regs,
37 + struct pt_regs.cp0_status],[],[], [#include <asm/ptrace.h>])
39 AM_CONDITIONAL(WANT_PEEKFD_I386,
40 test $ac_cv_member_struct_user_regs_struct_orig_eax = yes &&
41 @@ -90,11 +98,9 @@ AM_CONDITIONAL(WANT_PEEKFD_PPC,
42 AM_CONDITIONAL(WANT_PEEKFD_ARM,
43 test $ac_cv_member_struct_pt_regs_uregs = yes)
44 AM_CONDITIONAL(WANT_PEEKFD_MIPS,
45 - test $ac_cv_member_struct_pt_regs_regs = yes)
47 -dnl Check for language stuff
48 -AM_GNU_GETTEXT([external])
49 -AM_GNU_GETTEXT_VERSION([0.16.1])
50 + test $build_cpu = mipsel &&
51 + test $ac_cv_member_struct_pt_regs_regs = yes &&
52 + test $ac_cv_member_struct_pt_regs_cp0_status = yes)
54 dnl Checks for library functions.