/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. AC_DEFUN([AC_MRSH],
  17. [
  18. #
  19. # Check for whether to include mrsh module
  20. #
  21. AC_MSG_CHECKING([for whether to build mrsh module])
  22. AC_ARG_WITH([mrsh],
  23. AC_HELP_STRING([--with-mrsh], [Build mrsh module]),
  24. [ case "$withval" in
  25. no) ac_with_mrsh=no ;;
  26. yes) ac_with_mrsh=yes ;;
  27. *) AC_MSG_RESULT([doh!])
  28. AC_MSG_ERROR([bad value "$withval" for --with-mrsh]) ;;
  29. esac
  30. ]
  31. )
  32. AC_MSG_RESULT([${ac_with_mrsh=no}])
  33. if test "$ac_with_mrsh" = "yes"; then
  34. # is libmunge installed?
  35. AC_CHECK_LIB([munge], [munge_encode], [ac_have_libmunge=yes], [])
  36. if test "$ac_have_libmunge" != "yes" ; then
  37. AC_MSG_NOTICE([Cannot support mrsh without libmunge])
  38. fi
  39. if test "$ac_have_libmunge" = "yes" ; then
  40. ac_have_mrsh=yes
  41. AC_ADD_STATIC_MODULE("mcmd")
  42. MRSH_LIBS="-lmunge"
  43. AC_DEFINE([HAVE_MRSH], [1], [Define if you have mrsh.])
  44. fi
  45. fi
  46. AC_SUBST(HAVE_MRSH)
  47. AC_SUBST(MRSH_LIBS)
  48. ])