aboutsummaryrefslogtreecommitdiffstats
path: root/macosx-setup.sh
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2013-06-19 23:52:54 +0000
committerEvan Huus <eapache@gmail.com>2013-06-19 23:52:54 +0000
commitc0fda177b6c4f7e4d0e77acf7c3ee5c7988adab9 (patch)
tree6b29e094fb2555006039d25e58befe3883b55d2e /macosx-setup.sh
parent88a4c49bf775380906c1160fcbed53fb350137a2 (diff)
From Dirk J via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8821
if no make options are given to the macosx-setup.sh script by the user, the script sets the number of parallel make jobs to 1.5x CPU cores. Bonus enhancement: print the "export PKG_CONFIG_PATH" information in autogen.sh on OsX, so people don't have to remember it. svn path=/trunk/; revision=50070
Diffstat (limited to 'macosx-setup.sh')
-rwxr-xr-xmacosx-setup.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/macosx-setup.sh b/macosx-setup.sh
index 53b22411bd..719392d00b 100755
--- a/macosx-setup.sh
+++ b/macosx-setup.sh
@@ -101,9 +101,11 @@ fi
# export LDFLAGS="$LDFLAGS -arch i386"
#
-# if you have many CPU cores, you can increase this number for more
-# parallel compilation.
-MAKE_BUILD_OPTS="-j 3"
+# if no make options are present, set default options
+if [ -z "$MAKE_BUILD_OPTS" ] ; then
+ # by default use 1.5x number of cores for parallel build
+ MAKE_BUILD_OPTS="-j $(( $(sysctl -n hw.logicalcpu) * 3 / 2))"
+fi
#
# Versions to download and install.