1##*****************************************************************************
2## $Id$
3##*****************************************************************************
4#  AUTHOR:
5#    Jim Garlick <garlick@llnl.gov>
6#
7#  SYNOPSIS:
8#    AC_FANOUT
9#
10#  DESCRIPTION:
11#    Adds support for the "--with-fanout=" configure script option to
12#    specify the default pdsh fanout.
13#
14#
15#  WARNINGS:
16#    This macro must be placed after AC_PROG_CC or equivalent.
17##*****************************************************************************
18
19AC_DEFUN([AC_FANOUT],
20[
21  AC_MSG_CHECKING([for default fanout])
22  AC_ARG_WITH([fanout],
23    AS_HELP_STRING([--with-fanout=N],[Specify default fanout]),
24    [ case "$withval" in
25        no)  FANOUT=1 ;;
26        *)   FANOUT=$withval ;;
27      esac
28    ]
29  )
30  AC_MSG_RESULT([${FANOUT=32}])
31  AC_DEFINE_UNQUOTED(DFLT_FANOUT, $FANOUT, [Define to default pdsh fanout.])
32  AC_SUBST(FANOUT)
33])
34