mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-18 20:37:56 +00:00
66821508f4
Also, fix the use of AC_CACHE_CHECK in stat format checker. Signed-off-by: Alexey Neyman <stilor@att.net>
11 lines
425 B
Plaintext
11 lines
425 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],
|
|
[ctng_cv_cpu_count],
|
|
[getconf _NPROCESSORS_ONLN >/dev/null 2>&1 && \
|
|
ctng_cv_cpu_count="getconf _NPROCESSORS_ONLN"
|
|
sysctl -n hw.ncpu >/dev/null 2>&1 && \
|
|
ctng_cv_cpu_count="sysctl -n hw.ncpu"])
|
|
AC_SUBST(CPU_COUNT, "$ctng_cv_cpu_count")
|
|
])
|