|  | 
| 11 | 11 | # Copyright (c) 2004-2006 The Regents of the University of California. | 
| 12 | 12 | #                         All rights reserved. | 
| 13 | 13 | # Copyright (c) 2006      QLogic Corp. All rights reserved. | 
| 14 |  | -# Copyright (c) 2009      Cisco Systems, Inc.  All rights reserved. | 
|  | 14 | +# Copyright (c) 2009-2016 Cisco Systems, Inc.  All rights reserved. | 
| 15 | 15 | # Copyright (c) 2014      Intel Corporation. All rights reserved. | 
| 16 | 16 | # Copyright (c) 2015      Research Organization for Information Science | 
| 17 | 17 | #                         and Technology (RIST). All rights reserved. | 
|  | 18 | +# Copyright (c) 2016      Los Alamos National Security, LLC. All rights | 
|  | 19 | +#                         reserved. | 
| 18 | 20 | # $COPYRIGHT$ | 
| 19 | 21 | # | 
| 20 | 22 | # Additional copyrights may follow | 
|  | 
| 28 | 30 | # LDFLAGS, LIBS} as needed and runs action-if-found if there is | 
| 29 | 31 | # support, otherwise executes action-if-not-found | 
| 30 | 32 | AC_DEFUN([OMPI_CHECK_PSM2],[ | 
| 31 |  | -    AC_ARG_WITH([psm2], | 
| 32 |  | -        [AC_HELP_STRING([--with-psm2(=DIR)], | 
| 33 |  | -             [Build PSM2 (Intel PSM2) support, optionally adding DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])]) | 
| 34 |  | -    OPAL_CHECK_WITHDIR([psm2], [$with_psm2], [include/psm2.h]) | 
| 35 |  | -    AC_ARG_WITH([psm2-libdir], | 
| 36 |  | -        [AC_HELP_STRING([--with-psm2-libdir=DIR], | 
| 37 |  | -             [Search for PSM (Intel PSM2) libraries in DIR])]) | 
| 38 |  | -    OPAL_CHECK_WITHDIR([psm2-libdir], [$with_psm2_libdir], [libpsm2.*]) | 
|  | 33 | +    if test -z "$ompi_check_psm2_happy" ; then | 
|  | 34 | +	AC_ARG_WITH([psm2], | 
|  | 35 | +		    [AC_HELP_STRING([--with-psm2(=DIR)], | 
|  | 36 | +				    [Build PSM2 (Intel PSM2) support, optionally adding DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])]) | 
|  | 37 | +	OPAL_CHECK_WITHDIR([psm2], [$with_psm2], [include/psm2.h]) | 
|  | 38 | +	AC_ARG_WITH([psm2-libdir], | 
|  | 39 | +		    [AC_HELP_STRING([--with-psm2-libdir=DIR], | 
|  | 40 | +				    [Search for PSM (Intel PSM2) libraries in DIR])]) | 
|  | 41 | +	OPAL_CHECK_WITHDIR([psm2-libdir], [$with_psm2_libdir], [libpsm2.*]) | 
| 39 | 42 | 
 | 
| 40 |  | -    ompi_check_psm2_$1_save_CPPFLAGS="$CPPFLAGS" | 
| 41 |  | -    ompi_check_psm2_$1_save_LDFLAGS="$LDFLAGS" | 
| 42 |  | -    ompi_check_psm2_$1_save_LIBS="$LIBS" | 
|  | 43 | +	ompi_check_psm2_$1_save_CPPFLAGS="$CPPFLAGS" | 
|  | 44 | +	ompi_check_psm2_$1_save_LDFLAGS="$LDFLAGS" | 
|  | 45 | +	ompi_check_psm2_$1_save_LIBS="$LIBS" | 
| 43 | 46 | 
 | 
| 44 |  | -    AS_IF([test "$with_psm2" != "no"], | 
| 45 |  | -          [AS_IF([test ! -z "$with_psm2" && test "$with_psm2" != "yes"], | 
| 46 |  | -                 [ompi_check_psm2_dir="$with_psm2"]) | 
| 47 |  | -           AS_IF([test ! -z "$with_psm2_libdir" && test "$with_psm2_libdir" != "yes"], | 
| 48 |  | -                 [ompi_check_psm2_libdir="$with_psm2_libdir"]) | 
|  | 47 | +	AS_IF([test "$with_psm2" != "no"], | 
|  | 48 | +              [AS_IF([test ! -z "$with_psm2" && test "$with_psm2" != "yes"], | 
|  | 49 | +                     [ompi_check_psm2_dir="$with_psm2"]) | 
|  | 50 | +               AS_IF([test ! -z "$with_psm2_libdir" && test "$with_psm2_libdir" != "yes"], | 
|  | 51 | +                     [ompi_check_psm2_libdir="$with_psm2_libdir"]) | 
| 49 | 52 | 
 | 
| 50 |  | -           OPAL_CHECK_PACKAGE([$1], | 
| 51 |  | -                              [psm2.h], | 
| 52 |  | -                              [psm2], | 
| 53 |  | -                              [psm2_mq_irecv2], | 
| 54 |  | -			      [], | 
| 55 |  | -                              [$ompi_check_psm2_dir], | 
| 56 |  | -                              [$ompi_check_psm2_libdir], | 
| 57 |  | -                              [ompi_check_psm2_happy="yes"], | 
| 58 |  | -                              [ompi_check_psm2_happy="no"])], | 
| 59 |  | -          [ompi_check_psm2_happy="no"]) | 
|  | 53 | +               OPAL_CHECK_PACKAGE([ompi_check_psm2], | 
|  | 54 | +				  [psm2.h], | 
|  | 55 | +				  [psm2], | 
|  | 56 | +				  [psm2_mq_irecv2], | 
|  | 57 | +				  [], | 
|  | 58 | +				  [$ompi_check_psm2_dir], | 
|  | 59 | +				  [$ompi_check_psm2_libdir], | 
|  | 60 | +				  [ompi_check_psm2_happy="yes"], | 
|  | 61 | +				  [ompi_check_psm2_happy="no"])], | 
|  | 62 | +              [ompi_check_psm2_happy="no"]) | 
| 60 | 63 | 
 | 
| 61 |  | -    CPPFLAGS="$ompi_check_psm2_$1_save_CPPFLAGS" | 
| 62 |  | -    LDFLAGS="$ompi_check_psm2_$1_save_LDFLAGS" | 
| 63 |  | -    LIBS="$ompi_check_psm2_$1_save_LIBS" | 
|  | 64 | +	CPPFLAGS="$ompi_check_psm2_$1_save_CPPFLAGS" | 
|  | 65 | +	LDFLAGS="$ompi_check_psm2_$1_save_LDFLAGS" | 
|  | 66 | +	LIBS="$ompi_check_psm2_$1_save_LIBS" | 
| 64 | 67 | 
 | 
| 65 |  | -    AS_IF([test "$ompi_check_psm2_happy" = "yes" && test "$enable_progress_threads" = "yes"], | 
| 66 |  | -          [AC_MSG_WARN([PSM2 driver does not currently support progress threads.  Disabling MTL.]) | 
| 67 |  | -           ompi_check_psm2_happy="no"]) | 
|  | 68 | +	AS_IF([test "$ompi_check_psm2_happy" = "yes" && test "$enable_progress_threads" = "yes"], | 
|  | 69 | +              [AC_MSG_WARN([PSM2 driver does not currently support progress threads.  Disabling MTL.]) | 
|  | 70 | +               ompi_check_psm2_happy="no"]) | 
| 68 | 71 | 
 | 
| 69 |  | -    AS_IF([test "$ompi_check_psm2_happy" = "yes"], | 
| 70 |  | -          [AC_CHECK_HEADERS( | 
|  | 72 | +	AS_IF([test "$ompi_check_psm2_happy" = "yes"], | 
|  | 73 | +              [AC_CHECK_HEADERS( | 
| 71 | 74 |                 glob.h, | 
| 72 | 75 |                     [], | 
| 73 | 76 |                     [AC_MSG_WARN([glob.h not found.  Can not build component.]) | 
| 74 | 77 |                     ompi_check_psm2_happy="no"])]) | 
| 75 | 78 | 
 | 
| 76 |  | -	 | 
|  | 79 | +	OPAL_SUMMARY_ADD([[Transports]],[[Intel Omnipath (PSM2)]],[$1],[$ompi_check_psm2_happy]) | 
|  | 80 | +    fi | 
|  | 81 | + | 
| 77 | 82 |     AS_IF([test "$ompi_check_psm2_happy" = "yes"], | 
| 78 |  | -          [$2], | 
|  | 83 | +          [$1_LDFLAGS="[$]$1_LDFLAGS $ompi_check_psm2_LDFLAGS" | 
|  | 84 | +	   $1_CPPFLAGS="[$]$1_CPPFLAGS $ompi_check_psm2_CPPFLAGS" | 
|  | 85 | +	   $1_LIBS="[$]$1_LIBS $ompi_check_psm2_LIBS" | 
|  | 86 | +	   $2], | 
| 79 | 87 |           [AS_IF([test ! -z "$with_psm2" && test "$with_psm2" != "no"], | 
| 80 | 88 |                  [AC_MSG_ERROR([PSM2 support requested but not found.  Aborting])]) | 
| 81 | 89 |            $3]) | 
|  | 
0 commit comments