From c415b4932aba6ec76e65f7c5c37a40c5ac5b4c4a Mon Sep 17 00:00:00 2001 From: Thorsten Behrens Date: Tue, 21 Sep 2010 22:28:08 +0200 Subject: Added mac version of num_cpu detection --- configure.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 69b5529fb1b4..30f667ae069e 100644 --- a/configure.in +++ b/configure.in @@ -7383,7 +7383,11 @@ dnl =================================================================== dnl Number of CPUs to use during the build dnl =================================================================== AC_MSG_CHECKING([for number of processors to use]) -BUILD_NCPUS=`grep $'^processor\t*:' /proc/cpuinfo | wc -l` +if test "z`uname -s`" = "zDarwin"; then + BUILD_NCPUS=`sysctl -n hw.ncpu` +else + BUILD_NCPUS=`grep $'^processor\t*:' /proc/cpuinfo | wc -l` +fi if test "z$with_num_cpus" != "z"; then BUILD_NCPUS=$with_num_cpus fi -- cgit