Author: doogie
Date: 1999-12-10 04:39:51 GMT
Handle the case where getconf exists, but doesn't know about
_NPROCESSORS_ONLN.
AC_DEFUN(ah_NUM_CPUS,
[AC_REQUIRE([ah_HAVE_GETCONF])
AC_MSG_CHECKING([number of cpus])
AC_DEFUN(ah_NUM_CPUS,
[AC_REQUIRE([ah_HAVE_GETCONF])
AC_MSG_CHECKING([number of 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`
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`
fi
elif test ! "$withval" = "no";then
NUM_CPUS=$withval
fi],
[if test ! -z "$GETCONF";then
NUM_CPUS=`$GETCONF _NPROCESSORS_ONLN 2>/dev/null`
fi
elif test ! "$withval" = "no";then
NUM_CPUS=$withval
fi],
[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
if test $NUM_CPUS = 1 ;then
default_PROC_MULTIPLY=1
else