/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. AC_DEFUN([AC_MACHINES],
  19. [
  20. AC_MSG_CHECKING([for path to machines file])
  21. AC_ARG_WITH([machines],
  22. AC_HELP_STRING([--with-machines(=PATH)], [Specify a flat file list of all nodes]),
  23. [ case "$withval" in
  24. no) ac_have_machines=no ;;
  25. yes) ac_have_machines=yes
  26. MACHINES="/etc/machines" ;;
  27. *) ac_have_machines=yes
  28. MACHINES=$withval
  29. esac
  30. ]
  31. )
  32. AC_MSG_RESULT([${ac_have_machines=no}])
  33. : ${ac_have_machines=no}
  34. if test "$ac_have_machines" = yes; then
  35. AC_ADD_STATIC_MODULE("machines")
  36. AC_DEFINE([HAVE_MACHINES], [1], [Define if you have machines])
  37. AC_DEFINE_UNQUOTED([_PATH_MACHINES], ["$MACHINES"],
  38. [Define to default machines file.])
  39. fi
  40. AC_SUBST(HAVE_MACHINES)
  41. AC_SUBST(MACHINES)
  42. ])