PageRenderTime 21ms CodeModel.GetById 19ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/config/ac_mrsh.m4

https://code.google.com/
m4 | 53 lines | 29 code | 5 blank | 19 comment | 0 complexity | a73b161776db840322b8486cd3e4d263 MD5 | raw file
 1##*****************************************************************************
 2## $Id$
 3##*****************************************************************************
 4#  AUTHOR:
 5#    Jim Garlick <garlick@llnl.gov>
 6#
 7#  SYNOPSIS:
 8#    AC_MRSH
 9#
10#  DESCRIPTION:
11#    Checks for mrsh
12#
13#  WARNINGS:
14#    This macro must be placed after AC_PROG_CC or equivalent.
15##*****************************************************************************
16
17AC_DEFUN([AC_MRSH],
18[
19  #
20  # Check for whether to include mrsh module
21  #
22  AC_MSG_CHECKING([for whether to build mrsh module])
23  AC_ARG_WITH([mrsh],
24    AC_HELP_STRING([--with-mrsh], [Build mrsh module]),
25    [ case "$withval" in
26        no)  ac_with_mrsh=no ;;
27        yes) ac_with_mrsh=yes ;;
28        *)   AC_MSG_RESULT([doh!])
29             AC_MSG_ERROR([bad value "$withval" for --with-mrsh]) ;;
30      esac
31    ]
32  )
33  AC_MSG_RESULT([${ac_with_mrsh=no}])
34   
35  if test "$ac_with_mrsh" = "yes"; then
36    # is libmunge installed?    
37    AC_CHECK_LIB([munge], [munge_encode], [ac_have_libmunge=yes], [])
38
39    if test "$ac_have_libmunge" != "yes" ; then
40       AC_MSG_NOTICE([Cannot support mrsh without libmunge])
41    fi 
42
43    if test "$ac_have_libmunge" = "yes" ; then
44      ac_have_mrsh=yes
45      AC_ADD_STATIC_MODULE("mcmd")
46      MRSH_LIBS="-lmunge"
47      AC_DEFINE([HAVE_MRSH], [1], [Define if you have mrsh.])
48    fi
49  fi
50
51  AC_SUBST(HAVE_MRSH)
52  AC_SUBST(MRSH_LIBS)
53])