f5e1a672cc
Update the OPAL_CHECK_OFI configury macro: - Make it safe to call the macro multiple times: - The checks only execute the first time it is invoked - Subsequent invocations, it just emits a friendly "checking..." message so that configure output is sensible/logical - With the goal of ultimately removing opal/mca/common/ofi, rename the output variables from OPAL_CHECK_OFI to be opal_ofi_{happy|CPPFLAGS|LDFLAGS|LIBS}. - Update btl/ofi, btl/usnic, and mtl/ofi for these new conventions. - Also, don't use AC_REQUIRE to invoke OPAL_CHECK_OFI because that causes the macro to be invoked at a fairly random time, which makes configure stdout confusing / hard to grok. - Remove a little left-over kruft in OPAL_CHECK_OFI, too (which resulted in an indenting change, making the change to opal_check_ofi.m4 look larger than it really is). Thanks Alastair McKinstry for the report and initial fix. Thanks Rashika Kheria for the reminder. Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
53 строки
1.9 KiB
Bash
53 строки
1.9 KiB
Bash
# -*- shell-script -*-
|
|
#
|
|
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
|
# University Research and Technology
|
|
# Corporation. All rights reserved.
|
|
# Copyright (c) 2004-2005 The University of Tennessee and The University
|
|
# of Tennessee Research Foundation. All rights
|
|
# reserved.
|
|
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
# University of Stuttgart. All rights reserved.
|
|
# Copyright (c) 2004-2006 The Regents of the University of California.
|
|
# All rights reserved.
|
|
# Copyright (c) 2006 QLogic Corp. All rights reserved.
|
|
# Copyright (c) 2009-2019 Cisco Systems, Inc. All rights reserved
|
|
# Copyright (c) 2011-2018 Los Alamos National Security, LLC.
|
|
# All rights reserved.
|
|
# Copyright (c) 2018 Intel, inc. All rights reserved
|
|
#
|
|
# $COPYRIGHT$
|
|
#
|
|
# Additional copyrights may follow
|
|
#
|
|
# $HEADER$
|
|
#
|
|
|
|
# OPAL_CHECK_OFI(prefix, [action-if-found], [action-if-not-found])
|
|
# --------------------------------------------------------
|
|
# check if OFI 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([MCA_opal_btl_ofi_CONFIG],[
|
|
OPAL_VAR_SCOPE_PUSH([opal_btl_ofi_happy CPPFLAGS_save])
|
|
|
|
AC_CONFIG_FILES([opal/mca/btl/ofi/Makefile])
|
|
|
|
# Check for OFI
|
|
OPAL_CHECK_OFI
|
|
|
|
opal_btl_ofi_happy=0
|
|
AS_IF([test "$opal_ofi_happy" = "yes"],
|
|
[CPPFLAGS_save=$CPPFLAGS
|
|
CPPFLAGS="$opal_ofi_CPPFLAGS $CPPFLAGS"
|
|
AC_CHECK_DECL([FI_MR_VIRT_ADDR], [opal_btl_ofi_happy=1], [],
|
|
[#include <rdma/fabric.h>])
|
|
CPPFLAGS=$CPPFLAGS_save])
|
|
AS_IF([test $opal_btl_ofi_happy -eq 1],
|
|
[$1],
|
|
[$2])
|
|
|
|
OPAL_VAR_SCOPE_POP
|
|
])dnl
|