73b812dd216e36843a059ece19c8f5bbea49a326
[gnulib.git] / m4 / nproc.m4
1 # nproc.m4 serial 1
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/param.h],,, [AC_INCLUDES_DEFAULT])
16   dnl <sys/sysctl.h> requires <sys/param.h> on OpenBSD 4.0.
17   AC_CHECK_HEADERS([sys/sysctl.h],,,
18     [AC_INCLUDES_DEFAULT
19      #if HAVE_SYS_PARAM_H
20      # include <sys/param.h>
21      #endif
22     ])
23   AC_CHECK_FUNCS([sysctl])
24 ])