mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-20 05:17:54 +00:00
11 lines
421 B
Plaintext
11 lines
421 B
Plaintext
|
# Find out how to count CPUs
|
||
|
AC_DEFUN([CTNG_CPU_COUNT],
|
||
|
[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")
|
||
|
])
|