PageRenderTime 30ms CodeModel.GetById 27ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/config/ac_machines.m4

https://code.google.com/
m4 | 44 lines | 25 code | 2 blank | 17 comment | 0 complexity | 0546a47f5c18f6f425d643742e5f14f4 MD5 | raw file
 1##*****************************************************************************
 2## $Id$
 3##*****************************************************************************
 4#  AUTHOR:
 5#    Jim Garlick <garlick@llnl.gov>
 6#
 7#  SYNOPSIS:
 8#    AC_MACHINES
 9#
10#  DESCRIPTION:
11#    Adds support for the "--with-machines=" configure script option to 
12#    specify a flat file list of all nodes. 
13#    
14#
15#  WARNINGS:
16#    This macro must be placed after AC_PROG_CC or equivalent.
17##*****************************************************************************
18
19AC_DEFUN([AC_MACHINES],
20[
21  AC_MSG_CHECKING([for path to machines file])
22  AC_ARG_WITH([machines],
23    AC_HELP_STRING([--with-machines(=PATH)], [Specify a flat file list of all nodes]),
24    [ case "$withval" in
25        no)  ac_have_machines=no ;;
26        yes) ac_have_machines=yes
27             MACHINES="/etc/machines" ;;
28        *)   ac_have_machines=yes
29             MACHINES=$withval 
30      esac
31    ]
32  )
33  AC_MSG_RESULT([${ac_have_machines=no}])
34  : ${ac_have_machines=no}
35  if test "$ac_have_machines" = yes; then
36        AC_ADD_STATIC_MODULE("machines")
37        AC_DEFINE([HAVE_MACHINES], [1], [Define if you have machines])
38	AC_DEFINE_UNQUOTED([_PATH_MACHINES], ["$MACHINES"], 
39	        		             [Define to default machines file.])
40  fi
41
42  AC_SUBST(HAVE_MACHINES)
43  AC_SUBST(MACHINES)
44])