PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/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
20
21AC_DEFUN([AC_ELAN],
22[
23   AC_CHECK_LIB([rmscall],  
24	        [rms_prgcreate], 
25	        [ac_elan_have_rmscall=yes; ELAN_LIBS="-lrmscall"])
26
27   if test "$ac_elan_have_rmscall" != "yes" ; then
28       AC_MSG_NOTICE([Cannot support QsNet without librmscall])        
29   fi
30
31   AC_CHECK_LIB([elan3], [elan3_create],  
32	        [ac_elan_have_elan3=yes],
33	        [ac_elan_noelan3=1])
34
35   AC_CHECK_LIB([elanctrl], [elanctrl_open], 
36	        [ac_elan_have_elanctrl=yes], 
37	        [ac_elan_noelanctrl=1])
38
39   if test "$ac_elan_have_elan3" = "yes"; then
40      AC_DEFINE(HAVE_LIBELAN3, 1, [define if you have libelan3.])
41      ELAN_LIBS="$ELAN_LIBS -lelan3"
42      test "$ac_elan_have_rmscall" = "yes" && ac_have_elan="yes"
43   elif test "$ac_elan_have_elanctrl" = "yes"; then
44      AC_DEFINE(HAVE_LIBELANCTRL, 1, [define if you have libelanctrl.])
45      ELAN_LIBS="$ELAN_LIBS -lelanctrl"
46      test "$ac_elan_have_rmscall" = "yes" && ac_have_elan="yes"
47   else
48      AC_MSG_NOTICE([Cannot support QsNet without libelan3 or libelanctrl!])
49   fi
50
51   if test "$ac_have_elan" = yes; then
52     AC_CHECK_LIB([elanhosts], [elanhost_config_create],
53                  [ac_elan_have_elanhosts=yes], [])
54
55     if test "$ac_elan_have_elanhosts" = "yes"; then
56        AC_DEFINE(HAVE_LIBELANHOSTS, 1, [define if you have libelanhosts.])
57        ELAN_LIBS="$ELAN_LIBS -lelanhosts"
58     else
59        ac_have_elan="no"
60        AC_MSG_NOTICE([Cannot build QsNet modules without libelanhosts])
61     fi
62   fi
63
64   AC_SUBST(ELAN_LIBS)
65])