PageRenderTime 8ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/config/ac_connect_timeout.m4

https://code.google.com/
m4 | 35 lines | 17 code | 1 blank | 17 comment | 0 complexity | 9bbd0e552bc456650635ce8763c5d459 MD5 | raw file
 1##*****************************************************************************
 2## $Id$
 3##*****************************************************************************
 4#  AUTHOR:
 5#    Jim Garlick <garlick@llnl.gov>
 6#
 7#  SYNOPSIS:
 8#    AC_CONNECT_TIMEOUT
 9#
10#  DESCRIPTION:
11#    Adds support for the "--with-connect-timeout=" configure script 
12#    option to specify the default pdsh connect timeout.
13#    
14#
15#  WARNINGS:
16#    This macro must be placed after AC_PROG_CC or equivalent.
17##*****************************************************************************
18
19AC_DEFUN([AC_CONNECT_TIMEOUT],
20[
21  AC_MSG_CHECKING([for default connect timeout])
22  AC_ARG_WITH([timeout],
23    AC_HELP_STRING([--with-timeout=N], 
24	[Specify default connect timeout (secs)]),
25    [ case "$withval" in
26        no)  CONNECT_TIMEOUT=0 ;;
27        *)   CONNECT_TIMEOUT=$withval ;;
28      esac
29    ]
30  )
31  AC_MSG_RESULT([${CONNECT_TIMEOUT=10}])
32  AC_DEFINE_UNQUOTED(CONNECT_TIMEOUT, $CONNECT_TIMEOUT, 
33		            [Define to default pdsh connect timeout.])
34  AC_SUBST(CONNECT_TIMEOUT)
35])