Implement nproc for IRIX.
[pspp] / m4 / nproc.m4
1 # nproc.m4 serial 3
2 dnl Copyright (C) 2009 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved.
6
7 AC_DEFUN([gl_NPROC],
8 [
9   gl_PREREQ_NPROC
10 ])
11
12 # Prerequisites of lib/nproc.c.
13 AC_DEFUN([gl_PREREQ_NPROC],
14 [
15   AC_CHECK_HEADERS([sys/pstat.h sys/sysmp.h sys/param.h],,,
16     [AC_INCLUDES_DEFAULT])
17   dnl <sys/sysctl.h> requires <sys/param.h> on OpenBSD 4.0.
18   AC_CHECK_HEADERS([sys/sysctl.h],,,
19     [AC_INCLUDES_DEFAULT
20      #if HAVE_SYS_PARAM_H
21      # include <sys/param.h>
22      #endif
23     ])
24   AC_CHECK_FUNCS([pstat_getdynamic sysmp sysctl])
25 ])