Skip to content

Commit 30fa645

Browse files
authored
Merge pull request #2619 from ggouaillardet/topic/v2.x/with_hwloc_external
v2.x: hwloc: correctly handle --with-hwloc=external
2 parents cf5a27f + 938d056 commit 30fa645

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

opal/mca/hwloc/Makefile.am

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
#
2-
# Copyright (c) 2011 Cisco Systems, Inc. All rights reserved.
2+
# Copyright (c) 2011-2016 Cisco Systems, Inc. All rights reserved.
3+
# Copyright (c) 2016 Research Organization for Information Science
4+
# and Technology (RIST). All rights reserved.
35
# $COPYRIGHT$
46
#
57
# Additional copyrights may follow
68
#
79
# $HEADER$
810
#
911

12+
# We do not want -I$(srcdir) in AM_CPPFLAGS, or there can be a
13+
# conflict between system hwloc.h and opal/mca/hwloc/hwloc.h. So just
14+
# set only what we need to AM_CPPFLAGS.
15+
AM_CPPFLAGS = -I$(top_builddir)/opal/include
16+
1017
# main library setup
1118
noinst_LTLIBRARIES = libmca_hwloc.la
1219
libmca_hwloc_la_SOURCES =

opal/mca/hwloc/external/configure.m4

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- shell-script -*-
22
#
33
# Copyright (c) 2009-2016 Cisco Systems, Inc. All rights reserved.
4-
# Copyright (c) 2014 Research Organization for Information Science
4+
# Copyright (c) 2014-2016 Research Organization for Information Science
55
# and Technology (RIST). All rights reserved.
66
#
77
# $COPYRIGHT$
@@ -61,12 +61,17 @@ AC_DEFUN([MCA_opal_hwloc_external_POST_CONFIG],[
6161
# OPAL_HWLOC_WANT_VERBS_HELPER is set, that file will
6262
# include the external hwloc/openfabrics-verbs.h file (via
6363
# the MCA_hwloc_external_openfabrics_helper define).
64+
AS_IF([test "$opal_hwloc_dir" != ""],
65+
[opal_hwloc_include="$opal_hwloc_dir/include/hwloc.h"
66+
opal_hwloc_openfabrics_include="$opal_hwloc_dir/include/hwloc/openfabrics-verbs.h"],
67+
[opal_hwloc_include="hwloc.h"
68+
opal_hwloc_openfabrics_include="hwloc/openfabrics-verbs.h"])
6469
AC_DEFINE_UNQUOTED(MCA_hwloc_external_header,
65-
["$opal_hwloc_dir/include/hwloc.h"],
70+
["$opal_hwloc_include"],
6671
[Location of external hwloc header])
6772
AC_DEFINE_UNQUOTED(MCA_hwloc_external_openfabrics_header,
68-
["$opal_hwloc_dir/include/hwloc/openfabrics-verbs.h"],
69-
[Location of external hwloc header])
73+
["$opal_hwloc_openfabrics_include"],
74+
[Location of external hwloc OpenFabrics header])
7075
])
7176
OPAL_VAR_SCOPE_POP
7277
])dnl

0 commit comments

Comments
 (0)