X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/36c62cf8e898860f61f6b0b45d90aeac7ff047c0..abb9b874c5d1573a42c8c5519a38ac0575ef77ba:/buildlib/tools.m4 diff --git a/buildlib/tools.m4 b/buildlib/tools.m4 index 6ef52d09c..507a319bd 100644 --- a/buildlib/tools.m4 +++ b/buildlib/tools.m4 @@ -16,23 +16,23 @@ AC_DEFUN(ah_HAVE_GETCONF, AC_DEFUN(ah_NUM_CPUS, [AC_REQUIRE([ah_HAVE_GETCONF]) AC_MSG_CHECKING([number of cpus]) + NUM_CPUS= AC_ARG_WITH(cpus, [ --with-cpus The number of cpus to be used for building(see --with-procs, default 1)], [if test "$withval" = "yes"; then if test ! -z "$GETCONF";then NUM_CPUS=`$GETCONF _NPROCESSORS_ONLN 2>/dev/null` - else - NUM_CPUS=1 fi elif test ! "$withval" = "no";then NUM_CPUS=$withval fi], - [if test "$GETCONF";then + [if test ! -z "$GETCONF";then NUM_CPUS=`$GETCONF _NPROCESSORS_ONLN 2>/dev/null` - else - NUM_CPUS=1 fi] ) + if test -z "$NUM_CPUS"; then + NUM_CPUS=1 + fi if test $NUM_CPUS = 1 ;then default_PROC_MULTIPLY=1 else