summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 3c94392..d80a5cd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -248,6 +248,15 @@ ACX_SET_KCONFIG_OPTION([stat_flavor_BSD])
test "$acx_cv_stat_flavor" = "GNU" && stat_flavor_GNU=y
ACX_SET_KCONFIG_OPTION([stat_flavor_GNU])
+#Find out how to count CPUs
+AC_CACHE_CHECK([whether to use getconf or sysctl to count CPUs],
+ [acx_cv_cpu_count],
+ [getconf _NPROCESSORS_ONLN >/dev/null 2>&1 && \
+ acx_cv_cpu_count="getconf _NPROCESSORS_ONLN"
+ sysctl -n hw.ncpu >/dev/null 2>&1 && \
+ acx_cv_cpu_count="sysctl -n hw.ncpu"])
+AC_SUBST(CPU_COUNT, "$acx_cv_cpu_count")
+
#--------------------------------------------------------------------
# Still boring, but remember the path, now...
#--------------------------------------------------------------------