|
17 | 17 | # LDFLAGS, LIBS} as needed and runs action-if-found if there is |
18 | 18 | # support, otherwise executes action-if-not-found |
19 | 19 | 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]) |
21 | 21 |
|
22 | 22 | AC_ARG_WITH([fca], |
23 | 23 | [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])]) |
26 | 26 |
|
27 | 27 | 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], "/")]) |
33 | 33 |
|
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 |
37 | 37 |
|
38 | | - CPPFLAGS_save=$CPPFLAGS |
39 | | - LDFLAGS_save=$LDFLAGS |
40 | | - LIBS_save=$LIBS |
41 | | - CPPFLAGS="$CPPFLAGS $coll_fca_extra_CPPFLAGS" |
42 | 38 |
|
| 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) |
43 | 42 |
|
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"]) |
47 | 52 |
|
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"]) |
63 | 57 |
|
64 | 58 | AS_IF([test "$ompi_check_fca_happy" = "yes" && test "$enable_progress_threads" = "yes"], |
65 | 59 | [AC_MSG_WARN([fca driver does not currently support progress threads. Disabling FCA.]) |
|
0 commit comments