|
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_HCOLL],[ |
20 | | - OPAL_VAR_SCOPE_PUSH([ompi_check_hcoll_dir ompi_hcoll_libdir ompi_check_hcoll_incdir ompi_check_hcoll_libs ompi_check_hcoll_happy CPPFLAGS_save LDFLAGS_save LIBS_save]) |
| 20 | + OPAL_VAR_SCOPE_PUSH([ompi_check_hcoll_dir ompi_check_hcoll_libs ompi_check_hcoll_happy CPPFLAGS_save LDFLAGS_save LIBS_save]) |
21 | 21 |
|
22 | 22 | AC_ARG_WITH([hcoll], |
23 | 23 | [AC_HELP_STRING([--with-hcoll(=DIR)], |
24 | | - [Build hcoll (Mellanox Hierarchical Collectives) support, searching for libraries in DIR])]) |
25 | | - OPAL_CHECK_WITHDIR([hcoll], [$with_hcoll], [lib/libhcoll.so]) |
| 24 | + [Build hcoll (Mellanox Hierarchical Collectives) 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_hcoll" != "no"], |
28 | | - [AS_IF([test ! -z "$with_hcoll" && test "$with_hcoll" != "yes"], |
29 | | - [ompi_check_hcoll_dir=$with_hcoll |
30 | | - ompi_check_hcoll_libdir="$ompi_check_hcoll_dir/lib" |
31 | | - ompi_check_hcoll_incdir="$ompi_check_hcoll_dir/include" |
32 | | - ompi_check_hcoll_libs=hcoll |
| 28 | + [ompi_check_hcoll_libs=hcoll |
| 29 | + AS_IF([test ! -z "$with_hcoll" && test "$with_hcoll" != "yes"], |
| 30 | + [ompi_check_hcoll_dir=$with_hcoll]) |
33 | 31 |
|
34 | | - coll_hcoll_extra_CPPFLAGS="-I$ompi_check_hcoll_incdir/hcoll -I$ompi_check_hcoll_incdir/hcoll/api" |
| 32 | + CPPFLAGS_save=$CPPFLAGS |
| 33 | + LDFLAGS_save=$LDFLAGS |
| 34 | + LIBS_save=$LIBS |
35 | 35 |
|
36 | | - AC_SUBST([coll_hcoll_extra_CPPFLAGS]) |
37 | | - AC_SUBST([coll_hcoll_HOME], "$ompi_check_hcoll_dir") |
38 | | - |
39 | | - |
40 | | - CPPFLAGS_save=$CPPFLAGS |
41 | | - LDFLAGS_save=$LDFLAGS |
42 | | - LIBS_save=$LIBS |
43 | | - CPPFLAGS="$CPPFLAGS $coll_hcoll_extra_CPPFLAGS" |
44 | | - |
45 | | - OPAL_LOG_MSG([$1_CPPFLAGS : $$1_CPPFLAGS], 1) |
46 | | - OPAL_LOG_MSG([$1_LDFLAGS : $$1_LDFLAGS], 1) |
47 | | - OPAL_LOG_MSG([$1_LIBS : $$1_LIBS], 1) |
48 | | - |
49 | | - OPAL_CHECK_PACKAGE([$1], |
50 | | - [hcoll_api.h], |
51 | | - [$ompi_check_hcoll_libs], |
52 | | - [hcoll_get_version], |
53 | | - [], |
54 | | - [$ompi_check_hcoll_dir], |
55 | | - [$ompi_check_hcoll_libdir], |
56 | | - [ompi_check_hcoll_happy="yes"], |
57 | | - [ompi_check_hcoll_happy="no"]) |
58 | | - |
59 | | - CPPFLAGS=$CPPFLAGS_save |
60 | | - LDFLAGS=$LDFLAGS_save |
61 | | - LIBS=$LIBS_save], |
62 | | - [ompi_check_hcoll_happy="no"]) |
63 | | - ]) |
| 36 | + OPAL_LOG_MSG([$1_CPPFLAGS : $$1_CPPFLAGS], 1) |
| 37 | + OPAL_LOG_MSG([$1_LDFLAGS : $$1_LDFLAGS], 1) |
| 38 | + OPAL_LOG_MSG([$1_LIBS : $$1_LIBS], 1) |
64 | 39 |
|
| 40 | + OPAL_CHECK_PACKAGE([$1], |
| 41 | + [hcoll/api/hcoll_api.h], |
| 42 | + [$ompi_check_hcoll_libs], |
| 43 | + [hcoll_get_version], |
| 44 | + [], |
| 45 | + [$ompi_check_hcoll_dir], |
| 46 | + [], |
| 47 | + [ompi_check_hcoll_happy="yes"], |
| 48 | + [ompi_check_hcoll_happy="no"]) |
65 | 49 |
|
| 50 | + CPPFLAGS=$CPPFLAGS_save |
| 51 | + LDFLAGS=$LDFLAGS_save |
| 52 | + LIBS=$LIBS_save], |
| 53 | + [ompi_check_hcoll_happy=no]) |
66 | 54 |
|
67 | 55 | AS_IF([test "$ompi_check_hcoll_happy" = "yes" && test "$enable_progress_threads" = "yes"], |
68 | 56 | [AC_MSG_WARN([hcoll driver does not currently support progress threads. Disabling HCOLL.]) |
|
0 commit comments