Skip to content

Commit 9dd3a02

Browse files
committed
configury: fix fca detection
* do not add -I/.../include/fca -I /.../include/fca_core to CPPFLAGS * allow configure --with-fca * search fca libs in both DIR/lib and DIR/lib64 * fix the description of the --with-fca option (cherry picked from commit open-mpi/ompi@1a238d3)
1 parent 725a11c commit 9dd3a02

File tree

4 files changed

+39
-40
lines changed

4 files changed

+39
-40
lines changed

config/ompi_check_libfca.m4

Lines changed: 27 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -17,49 +17,43 @@ dnl
1717
# LDFLAGS, LIBS} as needed and runs action-if-found if there is
1818
# support, otherwise executes action-if-not-found
1919
AC_DEFUN([OMPI_CHECK_FCA],[
20-
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])
20+
OPAL_VAR_SCOPE_PUSH([ompi_check_fca_libs ompi_check_fca_happy CPPFLAGS_save LDFLAGS_save LIBS_save])
2121

2222
AC_ARG_WITH([fca],
2323
[AC_HELP_STRING([--with-fca(=DIR)],
24-
[Build fca (Mellanox Fabric Collective Accelerator) support, searching for libraries in DIR])])
25-
OPAL_CHECK_WITHDIR([fca], [$with_fca], [lib/libfca.so])
24+
[Build fca (Mellanox Fabric Collective Accelerator) support, optionally adding
25+
DIR/include and DIR/lib or DIR/lib64 to the search path for headers and libraries])])
2626

2727
AS_IF([test "$with_fca" != "no"],
28-
[AS_IF([test ! -z "$with_fca" && test "$with_fca" != "yes"],
29-
[ompi_check_fca_dir=$with_fca
30-
ompi_check_fca_libdir="$ompi_check_fca_dir/lib"
31-
ompi_check_fca_incdir="$ompi_check_fca_dir/include"
32-
ompi_check_fca_libs=fca
28+
[ompi_check_fca_libs=fca
29+
AS_IF([test ! -z "$with_fca" && test "$with_fca" != "yes"],
30+
[ompi_check_fca_dir=$with_fca
31+
AC_SUBST([coll_fca_HOME], "$ompi_check_fca_dir")],
32+
[AC_SUBST([coll_fca_HOME], "/")])
3333

34-
coll_fca_extra_CPPFLAGS="-I$ompi_check_fca_incdir/fca -I$ompi_check_fca_incdir/fca_core"
35-
AC_SUBST([coll_fca_extra_CPPFLAGS])
36-
AC_SUBST([coll_fca_HOME], "$ompi_check_fca_dir")
34+
CPPFLAGS_save=$CPPFLAGS
35+
LDFLAGS_save=$LDFLAGS
36+
LIBS_save=$LIBS
3737

38-
CPPFLAGS_save=$CPPFLAGS
39-
LDFLAGS_save=$LDFLAGS
40-
LIBS_save=$LIBS
41-
CPPFLAGS="$CPPFLAGS $coll_fca_extra_CPPFLAGS"
4238

39+
OPAL_LOG_MSG([$1_CPPFLAGS : $$1_CPPFLAGS], 1)
40+
OPAL_LOG_MSG([$1_LDFLAGS : $$1_LDFLAGS], 1)
41+
OPAL_LOG_MSG([$1_LIBS : $$1_LIBS], 1)
4342

44-
OPAL_LOG_MSG([$1_CPPFLAGS : $$1_CPPFLAGS], 1)
45-
OPAL_LOG_MSG([$1_LDFLAGS : $$1_LDFLAGS], 1)
46-
OPAL_LOG_MSG([$1_LIBS : $$1_LIBS], 1)
43+
OPAL_CHECK_PACKAGE([$1],
44+
[fca/fca_api.h],
45+
[$ompi_check_fca_libs],
46+
[fca_get_version],
47+
[],
48+
[$ompi_check_fca_dir],
49+
[],
50+
[ompi_check_fca_happy="yes"],
51+
[ompi_check_fca_happy="no"])
4752

48-
OPAL_CHECK_PACKAGE([$1],
49-
[fca_api.h],
50-
[$ompi_check_fca_libs],
51-
[fca_get_version],
52-
[],
53-
[$ompi_check_fca_dir],
54-
[$ompi_check_fca_libdir],
55-
[ompi_check_fca_happy="yes"],
56-
[ompi_check_fca_happy="no"])
57-
58-
CPPFLAGS=$CPPFLAGS_save
59-
LDFLAGS=$LDFLAGS_save
60-
LIBS=$LIBS_save],
61-
[ompi_check_fca_happy="no"])
62-
])
53+
CPPFLAGS=$CPPFLAGS_save
54+
LDFLAGS=$LDFLAGS_save
55+
LIBS=$LIBS_save],
56+
[ompi_check_fca_happy="no"])
6357

6458
AS_IF([test "$ompi_check_fca_happy" = "yes" && test "$enable_progress_threads" = "yes"],
6559
[AC_MSG_WARN([fca driver does not currently support progress threads. Disabling FCA.])

ompi/mca/coll/fca/coll_fca_api.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/**
2-
Copyright (c) 2011 Mellanox Technologies. All rights reserved.
2+
Copyright (c) 2011 Mellanox Technologies. All rights reserved.
3+
Copyright (c) 2015 Research Organization for Information Science
4+
and Technology (RIST). All rights reserved.
35
$COPYRIGHT$
46
57
Additional copyrights may follow
@@ -9,8 +11,8 @@
911

1012
#include "ompi_config.h"
1113

12-
#include <fca_api.h>
13-
#include <config/fca_parse_specfile.h>
14+
#include <fca/fca_api.h>
15+
#include <fca/config/fca_parse_specfile.h>
1416

1517
#ifndef FCA_API
1618
#define OMPI_FCA_VERSION 12

oshmem/mca/scoll/fca/configure.m4

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
#
44
# Copyright (c) 2013 Mellanox Technologies, Inc.
55
# All rights reserved.
6+
# Copyright (c) 2015 Research Organization for Information Science
7+
# and Technology (RIST). All rights reserved.
68
# $COPYRIGHT$
79
#
810
# Additional copyrights may follow
@@ -24,7 +26,6 @@ AC_DEFUN([MCA_oshmem_scoll_fca_CONFIG],[
2426
AS_IF([test "$scoll_fca_happy" = "yes"],
2527
[scoll_fca_WRAPPER_EXTRA_LDFLAGS="$scoll_fca_LDFLAGS"
2628
scoll_fca_CPPFLAGS="$scoll_fca_CPPFLAGS"
27-
scoll_fca_WRAPPER_EXTRA_CPPFLAGS="$scoll_fca_CPPFLAGS"
2829
scoll_fca_WRAPPER_EXTRA_LIBS="$scoll_fca_LIBS"
2930
$1],
3031
[$2])

oshmem/mca/scoll/fca/scoll_fca_api.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/*
22
* Copyright (c) 2013 Mellanox Technologies, Inc.
33
* All rights reserved.
4+
* Copyright (c) 2015 Research Organization for Information Science
5+
* and Technology (RIST). All rights reserved.
46
* $COPYRIGHT$
57
*
68
* Additional copyrights may follow
@@ -9,9 +11,9 @@
911
*/
1012
#include "oshmem_config.h"
1113

12-
#include <fca_api.h>
13-
#include <fca_version.h>
14-
#include <config/fca_parse_specfile.h>
14+
#include <fca/fca_api.h>
15+
#include <fca/fca_version.h>
16+
#include <fca/config/fca_parse_specfile.h>
1517

1618
#ifndef FCA_API
1719
#define OSHMEM_FCA_VERSION 12

0 commit comments

Comments
 (0)