11# -*- shell-script -*-
22#
3- # Copyright (c) 2009-2017 Cisco Systems, Inc. All rights reserved
3+ # Copyright (c) 2009-2018 Cisco Systems, Inc. All rights reserved
44# Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
55# Copyright (c) 2015-2018 Research Organization for Information Science
66# and Technology (RIST). All rights reserved.
@@ -69,6 +69,21 @@ AC_DEFUN([MCA_opal_hwloc_hwloc201_POST_CONFIG],[
6969# MCA_hwloc_hwloc201_CONFIG([action-if-found], [action-if-not-found])
7070# --------------------------------------------------------------------
7171AC_DEFUN([MCA_opal_hwloc_hwloc201_CONFIG],[
72+ # We know that the external hwloc component will be configured
73+ # before this one because of its priority. This component is only
74+ # needed if the external component was not successful in selecting
75+ # itself.
76+ AC_MSG_CHECKING([if hwloc external component succeeded])
77+ AS_IF([test " $opal_hwloc_external_support " = " yes" ],
78+ [AC_MSG_RESULT([yes])
79+ AC_MSG_NOTICE([hwloc:external succeeded, so this component will be skipped])
80+ $2 ],
81+ [AC_MSG_RESULT([no])
82+ AC_MSG_NOTICE([hwloc:external failed, so this component will be used])
83+ MCA_opal_hwloc_hwloc201_BACKEND_CONFIG($1 , $2 )])
84+ ])
85+
86+ AC_DEFUN([MCA_opal_hwloc_hwloc201_BACKEND_CONFIG],[
7287 # Hwloc needs to know if we have Verbs support
7388 AC_REQUIRE([OPAL_CHECK_VERBS_DIR])
7489
@@ -80,19 +95,11 @@ AC_DEFUN([MCA_opal_hwloc_hwloc201_CONFIG],[
8095 opal_hwloc_hwloc201_basedir= opal/mca/hwloc/hwloc201
8196 opal_hwloc_hwloc201_support= no
8297
83- AS_IF([test " $with_hwloc " = " internal" || test -z " $with_hwloc " || test " $with_hwloc " = " yes" ],
84- [opal_hwloc_external= " no" ],
85- [opal_hwloc_external= " yes" ])
86-
8798 opal_hwloc_hwloc201_save_CPPFLAGS= $CPPFLAGS
8899 opal_hwloc_hwloc201_save_LDFLAGS= $LDFLAGS
89100 opal_hwloc_hwloc201_save_LIBS= $LIBS
90101
91- # Run the hwloc configuration - if no external hwloc, then set the prefixi
92- # to minimize the chance that someone will use the internal symbols
93- AS_IF([test " $opal_hwloc_external " = " no" &&
94- test " $with_hwloc " != " future" ],
95- [HWLOC_SET_SYMBOL_PREFIX([opal_hwloc201_])])
102+ HWLOC_SET_SYMBOL_PREFIX([opal_hwloc201_])
96103
97104 # save XML or graphical options
98105 opal_hwloc_hwloc201_save_cairo= $enable_cairo
0 commit comments