From 0e25c95eaeabca67cbe5ad6370171e1cff47e52a Mon Sep 17 00:00:00 2001 From: guserav Date: Fri, 9 Aug 2019 10:25:19 -0700 Subject: [PATCH] common/ofi: Fix check for OFI in build files The changes made in f5e1a672ccd5db127e85e1e8f6bcfeb8a8b04527 have been done after the common/ofi component was removed and thus the component doesn't reflect the changes made their. Namely f5e1a672ccd5db127e85e1e8f6bcfeb8a8b04527 changed: - How to call OPAL_CHECK_OFI (It sets opal_ofi_happy to yes now) - Dropped the common part in the build flags for ofi Signed-off-by: guserav --- opal/mca/common/ofi/Makefile.am | 11 ++++++----- opal/mca/common/ofi/configure.m4 | 19 +++++++++++-------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/opal/mca/common/ofi/Makefile.am b/opal/mca/common/ofi/Makefile.am index 658e1a703f..486acdf8b9 100644 --- a/opal/mca/common/ofi/Makefile.am +++ b/opal/mca/common/ofi/Makefile.am @@ -14,6 +14,7 @@ # Copyright (c) 2015 Intel, Inc. All rights reserved. # Copyright (c) 2017 Los Alamos National Security, LLC. All rights # reserved. +# Copyright (c) 2019 Hewlett Packard Enterprise. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -28,7 +29,7 @@ # Note that building this common component statically and linking # against other dynamic components is *not* supported! -AM_CPPFLAGS = $(opal_common_ofi_CPPFLAGS) +AM_CPPFLAGS = $(opal_ofi_CPPFLAGS) # Header files @@ -69,13 +70,13 @@ endif lib@OPAL_LIB_PREFIX@mca_common_ofi_la_SOURCES = $(headers) $(sources) lib@OPAL_LIB_PREFIX@mca_common_ofi_la_LDFLAGS = \ - $(opal_common_ofi_LDFLAGS) \ + $(opal_ofi_LDFLAGS) \ -version-info $(libmca_opal_common_ofi_so_version) -lib@OPAL_LIB_PREFIX@mca_common_ofi_la_LIBADD = $(opal_common_ofi_LIBS) +lib@OPAL_LIB_PREFIX@mca_common_ofi_la_LIBADD = $(opal_ofi_LIBS) lib@OPAL_LIB_PREFIX@mca_common_ofi_noinst_la_SOURCES = $(headers) $(sources) -lib@OPAL_LIB_PREFIX@mca_common_ofi_noinst_la_LDFLAGS = $(opal_common_ofi_LDFLAGS) -lib@OPAL_LIB_PREFIX@mca_common_ofi_noinst_la_LIBADD = $(opal_common_ofi_LIBS) +lib@OPAL_LIB_PREFIX@mca_common_ofi_noinst_la_LDFLAGS = $(opal_ofi_LDFLAGS) +lib@OPAL_LIB_PREFIX@mca_common_ofi_noinst_la_LIBADD = $(opal_ofi_LIBS) # Conditionally install the header files diff --git a/opal/mca/common/ofi/configure.m4 b/opal/mca/common/ofi/configure.m4 index 4e47ad278d..2877964244 100644 --- a/opal/mca/common/ofi/configure.m4 +++ b/opal/mca/common/ofi/configure.m4 @@ -8,6 +8,7 @@ # Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2017 Los Alamos National Security, LLC. All rights # reserved. +# Copyright (c) 2019 Hewlett Packard Enterprise. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -18,15 +19,17 @@ AC_DEFUN([MCA_opal_common_ofi_CONFIG],[ AC_CONFIG_FILES([opal/mca/common/ofi/Makefile]) - # Check for ofi. Note that $opal_common_ofi_happy is + OPAL_CHECK_OFI + + # Note that $opal_common_ofi_happy is # used in other configure.m4's to know if ofi configured # successfully. - OPAL_CHECK_OFI([opal_common_ofi], - [opal_common_ofi_happy=yes - common_ofi_WRAPPER_EXTRA_LDFLAGS=$opal_common_ofi_LDFLAGS - common_ofi_WRAPPER_EXTRA_LIBS=$opal_common_ofi_LIBS - $1], - [opal_common_ofi_happy=no - $2]) + AS_IF([test "$opal_ofi_happy" = "yes"], + [opal_common_ofi_happy=yes + common_ofi_WRAPPER_EXTRA_LDFLAGS=$opal_ofi_LDFLAGS + common_ofi_WRAPPER_EXTRA_LIBS=$opal_ofi_LIBS + $1], + [opal_common_ofi_happy=no + $2]) ])dnl