diff options
-rw-r--r-- | configure.in | 6 |
1 files changed, 5 insertions, 1 deletions
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 |