summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2017-03-07 16:50:43 (GMT)
committerGitHub <noreply@github.com>2017-03-07 16:50:43 (GMT)
commitea7f559ef4f4643c705c03ef438d6b257368e02c (patch)
treef5059ec8b1d2f7829fc764d1d2bd69156e09734a /configure.ac
parent272c010874b47ea50b653137e0d6e83a6543c318 (diff)
parenta511f73276351e41c59def3573f76b37a289d292 (diff)
Merge pull request #627 from dankm/freebsd
FreeBSD build support
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...
#--------------------------------------------------------------------