2010-08-02 15:25:53 +04:00
|
|
|
# -*- shell-script -*-
|
|
|
|
#
|
2011-05-16 18:43:11 +04:00
|
|
|
# Copyright (c) 2011 Mellanox Technologies. All rights reserved.
|
2010-08-02 15:25:53 +04:00
|
|
|
|
2013-12-07 03:40:34 +04:00
|
|
|
# Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
|
2010-08-02 15:25:53 +04:00
|
|
|
# $COPYRIGHT$
|
|
|
|
#
|
|
|
|
# Additional copyrights may follow
|
|
|
|
#
|
|
|
|
# $HEADER$
|
|
|
|
#
|
|
|
|
|
|
|
|
# OMPI_CHECK_FCA(prefix, [action-if-found], [action-if-not-found])
|
|
|
|
# --------------------------------------------------------
|
|
|
|
# check if fca support can be found. sets prefix_{CPPFLAGS,
|
|
|
|
# LDFLAGS, LIBS} as needed and runs action-if-found if there is
|
|
|
|
# support, otherwise executes action-if-not-found
|
|
|
|
AC_DEFUN([OMPI_CHECK_FCA],[
|
2013-12-08 02:54:10 +04:00
|
|
|
OPAL_VAR_SCOPE_PUSH([ompi_check_fca_libdir ompi_check_fca_incdir ompi_check_fca_libs ompi_check_fca_happy CPPFLAGS_save LDFLAGS_save LIBS_save])
|
2013-12-07 03:40:34 +04:00
|
|
|
|
2010-08-02 15:25:53 +04:00
|
|
|
AC_ARG_WITH([fca],
|
|
|
|
[AC_HELP_STRING([--with-fca(=DIR)],
|
2011-05-16 18:43:11 +04:00
|
|
|
[Build fca (Mellanox Fabric Collective Accelerator) support, searching for libraries in DIR])])
|
2014-05-01 19:38:07 +04:00
|
|
|
OPAL_CHECK_WITHDIR([fca], [$with_fca], [lib/libfca.so])
|
2010-08-02 15:25:53 +04:00
|
|
|
|
|
|
|
AS_IF([test "$with_fca" != "no"],
|
|
|
|
[AS_IF([test ! -z "$with_fca" -a "$with_fca" != "yes"],
|
2010-10-28 19:22:46 +04:00
|
|
|
[ompi_check_fca_dir=$with_fca
|
2010-08-02 15:25:53 +04:00
|
|
|
ompi_check_fca_libdir="$ompi_check_fca_dir/lib"
|
|
|
|
ompi_check_fca_incdir="$ompi_check_fca_dir/include"
|
2010-10-28 19:22:46 +04:00
|
|
|
ompi_check_fca_libs=fca
|
2010-08-02 15:25:53 +04:00
|
|
|
|
2013-12-07 19:00:54 +04:00
|
|
|
coll_fca_extra_CPPFLAGS="-I$ompi_check_fca_incdir/fca -I$ompi_check_fca_incdir/fca_core"
|
|
|
|
AC_SUBST([coll_fca_extra_CPPFLAGS])
|
|
|
|
AC_SUBST([coll_fca_HOME], "$ompi_check_fca_dir")
|
|
|
|
|
2010-10-28 19:22:46 +04:00
|
|
|
CPPFLAGS_save=$CPPFLAGS
|
|
|
|
LDFLAGS_save=$LDFLAGS
|
|
|
|
LIBS_save=$LIBS
|
2013-12-07 19:00:54 +04:00
|
|
|
CPPFLAGS="$CPPFLAGS $coll_fca_extra_CPPFLAGS"
|
|
|
|
|
2010-08-02 15:25:53 +04:00
|
|
|
|
2010-11-13 02:22:11 +03:00
|
|
|
OPAL_LOG_MSG([$1_CPPFLAGS : $$1_CPPFLAGS], 1)
|
|
|
|
OPAL_LOG_MSG([$1_LDFLAGS : $$1_LDFLAGS], 1)
|
|
|
|
OPAL_LOG_MSG([$1_LIBS : $$1_LIBS], 1)
|
2010-08-02 15:25:53 +04:00
|
|
|
|
2014-05-01 18:24:56 +04:00
|
|
|
OPAL_CHECK_PACKAGE([$1],
|
2010-08-08 17:28:41 +04:00
|
|
|
[fca_api.h],
|
2010-08-02 15:25:53 +04:00
|
|
|
[$ompi_check_fca_libs],
|
|
|
|
[fca_get_version],
|
2013-12-07 19:00:54 +04:00
|
|
|
[],
|
2010-08-02 15:25:53 +04:00
|
|
|
[$ompi_check_fca_dir],
|
|
|
|
[$ompi_check_fca_libdir],
|
|
|
|
[ompi_check_fca_happy="yes"],
|
2010-10-28 19:22:46 +04:00
|
|
|
[ompi_check_fca_happy="no"])
|
2010-08-02 15:25:53 +04:00
|
|
|
|
2010-10-28 19:22:46 +04:00
|
|
|
CPPFLAGS=$CPPFLAGS_save
|
|
|
|
LDFLAGS=$LDFLAGS_save
|
|
|
|
LIBS=$LIBS_save],
|
|
|
|
[ompi_check_fca_happy="no"])
|
|
|
|
])
|
2010-08-02 15:25:53 +04:00
|
|
|
|
|
|
|
AS_IF([test "$ompi_check_fca_happy" = "yes" -a "$enable_progress_threads" = "yes"],
|
|
|
|
[AC_MSG_WARN([fca driver does not currently support progress threads. Disabling FCA.])
|
|
|
|
ompi_check_fca_happy="no"])
|
|
|
|
|
|
|
|
AS_IF([test "$ompi_check_fca_happy" = "yes"],
|
|
|
|
[$2],
|
|
|
|
[AS_IF([test ! -z "$with_fca" -a "$with_fca" != "no"],
|
|
|
|
[AC_MSG_ERROR([FCA support requested but not found. Aborting])])
|
|
|
|
$3])
|
2013-12-07 03:40:34 +04:00
|
|
|
|
|
|
|
OPAL_VAR_SCOPE_POP
|
2010-08-02 15:25:53 +04:00
|
|
|
])
|
|
|
|
|