/config/ac_elan.m4

https://code.google.com/ · m4 · 65 lines · 38 code · 9 blank · 18 comment · 0 complexity · 1cd26522c4ef38a4f69d4366b180521b MD5 · raw file

  1. ##*****************************************************************************
  2. ## $Id$
  3. ##*****************************************************************************
  4. # AUTHOR:
  5. # Mark A. Grondona <mgrondona@llnl.gov>
  6. #
  7. # SYNOPSIS:
  8. # AC_ELAN
  9. #
  10. # DESCRIPTION:
  11. # Checks for whether Elan MPI may be supported either via libelan3
  12. # or libelanctrl. ELAN_LIBS is set to the libraries needed for
  13. # Elan modules.
  14. #
  15. # WARNINGS:
  16. # This macro must be called after AC_QSHELL and AC_MRSH
  17. # This macro must be placed after AC_PROG_CC or equivalent.
  18. ##*****************************************************************************
  19. AC_DEFUN([AC_ELAN],
  20. [
  21. AC_CHECK_LIB([rmscall],
  22. [rms_prgcreate],
  23. [ac_elan_have_rmscall=yes; ELAN_LIBS="-lrmscall"])
  24. if test "$ac_elan_have_rmscall" != "yes" ; then
  25. AC_MSG_NOTICE([Cannot support QsNet without librmscall])
  26. fi
  27. AC_CHECK_LIB([elan3], [elan3_create],
  28. [ac_elan_have_elan3=yes],
  29. [ac_elan_noelan3=1])
  30. AC_CHECK_LIB([elanctrl], [elanctrl_open],
  31. [ac_elan_have_elanctrl=yes],
  32. [ac_elan_noelanctrl=1])
  33. if test "$ac_elan_have_elan3" = "yes"; then
  34. AC_DEFINE(HAVE_LIBELAN3, 1, [define if you have libelan3.])
  35. ELAN_LIBS="$ELAN_LIBS -lelan3"
  36. test "$ac_elan_have_rmscall" = "yes" && ac_have_elan="yes"
  37. elif test "$ac_elan_have_elanctrl" = "yes"; then
  38. AC_DEFINE(HAVE_LIBELANCTRL, 1, [define if you have libelanctrl.])
  39. ELAN_LIBS="$ELAN_LIBS -lelanctrl"
  40. test "$ac_elan_have_rmscall" = "yes" && ac_have_elan="yes"
  41. else
  42. AC_MSG_NOTICE([Cannot support QsNet without libelan3 or libelanctrl!])
  43. fi
  44. if test "$ac_have_elan" = yes; then
  45. AC_CHECK_LIB([elanhosts], [elanhost_config_create],
  46. [ac_elan_have_elanhosts=yes], [])
  47. if test "$ac_elan_have_elanhosts" = "yes"; then
  48. AC_DEFINE(HAVE_LIBELANHOSTS, 1, [define if you have libelanhosts.])
  49. ELAN_LIBS="$ELAN_LIBS -lelanhosts"
  50. else
  51. ac_have_elan="no"
  52. AC_MSG_NOTICE([Cannot build QsNet modules without libelanhosts])
  53. fi
  54. fi
  55. AC_SUBST(ELAN_LIBS)
  56. ])