summaryrefslogtreecommitdiff
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
parent88a4c49bf775380906c1160fcbed53fb350137a2 (diff)
downloadwireshark-c0fda177b6c4f7e4d0e77acf7c3ee5c7988adab9.tar.gz
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
-rwxr-xr-xautogen.sh7
-rwxr-xr-xmacosx-setup.sh8
2 files changed, 11 insertions, 4 deletions
diff --git a/autogen.sh b/autogen.sh
index 5d45e447f6..3f3e35a242 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -123,7 +123,12 @@ $AUTOMAKE --add-missing --gnu $am_opt || exit 1
echo $AUTOCONF
$AUTOCONF || exit 1
-#./configure "$@" || exit 1
+if [ $(uname) = Darwin ] ; then
+ echo
+ echo "To configure Wireshark on OsX, you will need to type:"
+ echo "export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/X11/lib/pkgconfig"
+ echo "before you can run configure."
+fi
echo
echo "Now type \"./configure [options]\" and \"make\" to compile $PROJECT."
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.