X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=autogen.sh;h=2e138de2d5d98dc78796539a30d6f21bd94979c9;hp=e5000a6fd70cddc63b1f2a2dc21f54bc760641bc;hb=e8ca7526ddebc98f3023736f77fa13b65034767b;hpb=a24d175e6d093d6d9f6e583c3026e45924bad621 diff --git a/autogen.sh b/autogen.sh index e5000a6f..2e138de2 100755 --- a/autogen.sh +++ b/autogen.sh @@ -5,11 +5,15 @@ if [ -z "$n" ]; then n=$(grep ^processor /proc/cpuinfo 2>/dev/null | wc -l) [ $n -eq 0 ] && n=1 fi +# If we are compiling with distcc, try to guess a reasonable number +# based on (a) the number of cores on this machine and (b) the number +# of words in the DISTCC_HOSTS variable. +d="$(echo $DISTCC_HOSTS | wc -w)" +n=$(($n + 2 * $n * $d)) echo preparing, parallel=$n... if test -f Makefile; then make maintainer-clean > /dev/null 2>&1 fi -aclocal -I . > /dev/null 2>&1 autoconf autoheader echo configuring...