summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@novell.com>2010-09-21 22:28:08 +0200
committerThorsten Behrens <thb@openoffice.org>2010-09-21 22:29:45 +0200
commitc415b4932aba6ec76e65f7c5c37a40c5ac5b4c4a (patch)
treee05962bdb1fc03aaf8d13602dc675cfe8ecf9576 /configure.in
parentd8128261e661247d435c8b0cb49bcf25f127101e (diff)
Added mac version of num_cpu detection
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in6
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