/config/ac_xcpu.m4

https://code.google.com/ · m4 · 43 lines · 21 code · 4 blank · 18 comment · 0 complexity · bebb7bf06273f27af179a5c0fb8c6a46 MD5 · raw file

  1. ##*****************************************************************************
  2. ## $Id:$
  3. ##*****************************************************************************
  4. # AUTHOR:
  5. # Jim Garlick <garlick@llnl.gov>
  6. #
  7. # SYNOPSIS:
  8. # AC_XCPU
  9. #
  10. # DESCRIPTION:
  11. # Checks for xcpu
  12. #
  13. # WARNINGS:
  14. # This macro must be placed after AC_PROG_CC or equivalent.
  15. ##*****************************************************************************
  16. AC_DEFUN([AC_XCPU],
  17. [
  18. #
  19. # Check for whether to include xcpu module
  20. #
  21. AC_MSG_CHECKING([for whether to build xcpu module])
  22. AC_ARG_WITH([xcpu],
  23. AC_HELP_STRING([--with-xcpu], [Build xcpu module]),
  24. [ case "$withval" in
  25. no) ac_with_xcpu=no ;;
  26. yes) ac_with_xcpu=yes ;;
  27. *) AC_MSG_RESULT([doh!])
  28. AC_MSG_ERROR([bad value "$withval" for --with-xcpu]) ;;
  29. esac
  30. ]
  31. )
  32. AC_MSG_RESULT([${ac_with_xcpu=no}])
  33. if test "$ac_with_xcpu" = "yes"; then
  34. ac_have_xcpu=yes
  35. AC_ADD_STATIC_MODULE("xcpucmd")
  36. AC_DEFINE([HAVE_XCPU], [1], [Define if you have XCPU.])
  37. fi
  38. AC_SUBST(HAVE_XCPU)
  39. ])