11# -*- shell-script -*-
22#
3- # Copyright (c) 2009-2018 Cisco Systems, Inc. All rights reserved
3+ # Copyright (c) 2009-2019 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.
1717#
1818# Priority
1919#
20- AC_DEFUN([MCA_opal_hwloc_hwloc201_PRIORITY ], [80])
20+ AC_DEFUN([MCA_opal_hwloc_hwloc2_PRIORITY ], [80])
2121
2222#
2323# Force this component to compile in static-only mode
2424#
25- AC_DEFUN([MCA_opal_hwloc_hwloc201_COMPILE_MODE ], [
25+ AC_DEFUN([MCA_opal_hwloc_hwloc2_COMPILE_MODE ], [
2626 AC_MSG_CHECKING([for MCA component $2 :$3 compile mode])
2727 $4 = " static"
2828 AC_MSG_RESULT([$$ 4])
2929])
3030
3131# Include hwloc m4 files
32- m4_include(opal/mca/hwloc/hwloc201 /hwloc/config/hwloc.m4)
33- m4_include(opal/mca/hwloc/hwloc201 /hwloc/config/hwloc_pkg.m4)
34- m4_include(opal/mca/hwloc/hwloc201 /hwloc/config/hwloc_check_attributes.m4)
35- m4_include(opal/mca/hwloc/hwloc201 /hwloc/config/hwloc_check_visibility.m4)
36- m4_include(opal/mca/hwloc/hwloc201 /hwloc/config/hwloc_check_vendor.m4)
37- m4_include(opal/mca/hwloc/hwloc201 /hwloc/config/hwloc_components.m4)
38- m4_include(opal/mca/hwloc/hwloc201 /hwloc/config/hwloc_internal.m4)
39- m4_include(opal/mca/hwloc/hwloc201 /hwloc/config/netloc.m4)
40-
41- # MCA_hwloc_hwloc201_POST_CONFIG ()
32+ m4_include(opal/mca/hwloc/hwloc2 /hwloc/config/hwloc.m4)
33+ m4_include(opal/mca/hwloc/hwloc2 /hwloc/config/hwloc_pkg.m4)
34+ m4_include(opal/mca/hwloc/hwloc2 /hwloc/config/hwloc_check_attributes.m4)
35+ m4_include(opal/mca/hwloc/hwloc2 /hwloc/config/hwloc_check_visibility.m4)
36+ m4_include(opal/mca/hwloc/hwloc2 /hwloc/config/hwloc_check_vendor.m4)
37+ m4_include(opal/mca/hwloc/hwloc2 /hwloc/config/hwloc_components.m4)
38+ m4_include(opal/mca/hwloc/hwloc2 /hwloc/config/hwloc_internal.m4)
39+ m4_include(opal/mca/hwloc/hwloc2 /hwloc/config/netloc.m4)
40+
41+ # MCA_hwloc_hwloc2_POST_CONFIG ()
4242# ---------------------------------
43- AC_DEFUN([MCA_opal_hwloc_hwloc201_POST_CONFIG ],[
44- OPAL_VAR_SCOPE_PUSH([opal_hwloc_hwloc201_basedir ])
43+ AC_DEFUN([MCA_opal_hwloc_hwloc2_POST_CONFIG ],[
44+ OPAL_VAR_SCOPE_PUSH([opal_hwloc_hwloc2_basedir ])
4545
4646 # If we won, then do all the rest of the setup
47- AS_IF([test " $1 " = " 1" && test " $opal_hwloc_hwloc201_support " = " yes" ],
47+ AS_IF([test " $1 " = " 1" && test " $opal_hwloc_hwloc2_support " = " yes" ],
4848 [
4949 # Set this variable so that the framework m4 knows what
5050 # file to include in opal/mca/hwloc/hwloc-internal.h
51- opal_hwloc_hwloc201_basedir = opal/mca/hwloc/hwloc201
52- opal_hwloc_base_include= " $opal_hwloc_hwloc201_basedir /hwloc201 .h"
51+ opal_hwloc_hwloc2_basedir = opal/mca/hwloc/hwloc2
52+ opal_hwloc_base_include= " $opal_hwloc_hwloc2_basedir /hwloc2 .h"
5353
5454 # Add some stuff to CPPFLAGS so that the rest of the source
5555 # tree can be built
56- file= $opal_hwloc_hwloc201_basedir /hwloc
56+ file= $opal_hwloc_hwloc2_basedir /hwloc
5757 CPPFLAGS= " -I$OPAL_TOP_SRCDIR /$file /include $CPPFLAGS "
5858 AS_IF([test " $OPAL_TOP_BUILDDIR " != " $OPAL_TOP_SRCDIR " ],
5959 [CPPFLAGS= " -I$OPAL_TOP_BUILDDIR /$file /include $CPPFLAGS " ])
@@ -66,12 +66,12 @@ AC_DEFUN([MCA_opal_hwloc_hwloc201_POST_CONFIG],[
6666])dnl
6767
6868
69- # MCA_hwloc_hwloc201_CONFIG ([action-if-found], [action-if-not-found])
69+ # MCA_hwloc_hwloc2_CONFIG ([action-if-found], [action-if-not-found])
7070# --------------------------------------------------------------------
71- AC_DEFUN([MCA_opal_hwloc_hwloc201_CONFIG ],[
72- AC_CONFIG_FILES([opal/mca/hwloc/hwloc201 /Makefile])
71+ AC_DEFUN([MCA_opal_hwloc_hwloc2_CONFIG ],[
72+ AC_CONFIG_FILES([opal/mca/hwloc/hwloc2 /Makefile])
7373
74- OPAL_VAR_SCOPE_PUSH([HWLOC_VERSION opal_hwloc_hwloc201_save_CPPFLAGS opal_hwloc_hwloc201_save_LDFLAGS opal_hwloc_hwloc201_save_LIBS opal_hwloc_hwloc201_save_cairo opal_hwloc_hwloc201_save_xml opal_hwloc_hwloc201_save_mode opal_hwloc_hwloc201_basedir opal_hwloc_hwloc201_file opal_hwloc_hwloc201_save_cflags CPPFLAGS_save LIBS_save opal_hwloc_external])
74+ OPAL_VAR_SCOPE_PUSH([HWLOC_VERSION opal_hwloc_hwloc2_save_CPPFLAGS opal_hwloc_hwloc2_save_LDFLAGS opal_hwloc_hwloc2_save_LIBS opal_hwloc_hwloc2_save_cairo opal_hwloc_hwloc2_save_xml opal_hwloc_hwloc2_save_mode opal_hwloc_hwloc2_basedir opal_hwloc_hwloc2_file opal_hwloc_hwloc2_save_cflags CPPFLAGS_save LIBS_save opal_hwloc_external])
7575
7676 # We know that the external hwloc component will be configured
7777 # before this one because of its priority. This component is only
@@ -85,20 +85,20 @@ AC_DEFUN([MCA_opal_hwloc_hwloc201_CONFIG],[
8585 AC_MSG_NOTICE([hwloc:external failed, so this component will be used])])
8686
8787 # default to this component not providing support
88- opal_hwloc_hwloc201_basedir = opal/mca/hwloc/hwloc201
89- opal_hwloc_hwloc201_support = no
88+ opal_hwloc_hwloc2_basedir = opal/mca/hwloc/hwloc2
89+ opal_hwloc_hwloc2_support = no
9090
91- opal_hwloc_hwloc201_save_CPPFLAGS = $CPPFLAGS
92- opal_hwloc_hwloc201_save_LDFLAGS = $LDFLAGS
93- opal_hwloc_hwloc201_save_LIBS = $LIBS
91+ opal_hwloc_hwloc2_save_CPPFLAGS = $CPPFLAGS
92+ opal_hwloc_hwloc2_save_LDFLAGS = $LDFLAGS
93+ opal_hwloc_hwloc2_save_LIBS = $LIBS
9494
9595 # save XML or graphical options
96- opal_hwloc_hwloc201_save_cairo = $enable_cairo
97- opal_hwloc_hwloc201_save_xml = $enable_xml
98- opal_hwloc_hwloc201_save_static = $enable_static
99- opal_hwloc_hwloc201_save_shared = $enable_shared
100- opal_hwloc_hwloc201_save_plugins = $enable_plugins
101- opal_hwloc_hwloc201_save_mode = $hwloc_mode
96+ opal_hwloc_hwloc2_save_cairo = $enable_cairo
97+ opal_hwloc_hwloc2_save_xml = $enable_xml
98+ opal_hwloc_hwloc2_save_static = $enable_static
99+ opal_hwloc_hwloc2_save_shared = $enable_shared
100+ opal_hwloc_hwloc2_save_plugins = $enable_plugins
101+ opal_hwloc_hwloc2_save_mode = $hwloc_mode
102102
103103 # never enable hwloc's graphical option
104104 enable_cairo= no
@@ -129,28 +129,28 @@ AC_DEFUN([MCA_opal_hwloc_hwloc201_CONFIG],[
129129
130130 # hwloc checks for compiler visibility, and its needs to do
131131 # this without "picky" flags.
132- opal_hwloc_hwloc201_save_cflags = $CFLAGS
132+ opal_hwloc_hwloc2_save_cflags = $CFLAGS
133133 CFLAGS= $OPAL_CFLAGS_BEFORE_PICKY
134134 AS_IF([test -n " $opal_datatype_cuda_CPPFLAGS " ],
135135 [CPPFLAGS= " $CPPFLAGS $opal_datatype_cuda_CPPFLAGS " ])
136136
137137 # Only set the symbol prefix if this component is being used
138138 # (i.e., if the external component is not being used).
139139 AS_IF([test " $opal_hwloc_external_support " = " no" ],
140- [HWLOC_SET_SYMBOL_PREFIX([opal_hwloc201_ ])])
140+ [HWLOC_SET_SYMBOL_PREFIX([opal_hwloc2_ ])])
141141
142142 # Do the bulk of the hwloc core setup
143- HWLOC_SETUP_CORE([opal/mca/hwloc/hwloc201 /hwloc],
143+ HWLOC_SETUP_CORE([opal/mca/hwloc/hwloc2 /hwloc],
144144 [AC_MSG_CHECKING([whether hwloc configure succeeded])
145145 AC_MSG_RESULT([yes])
146- HWLOC_VERSION= " internal v` $srcdir /$opal_hwloc_hwloc201_basedir /hwloc/config/hwloc_get_version.sh $srcdir /$opal_hwloc_hwloc201_basedir /hwloc/VERSION` "
146+ HWLOC_VERSION= " internal v` $srcdir /$opal_hwloc_hwloc2_basedir /hwloc/config/hwloc_get_version.sh $srcdir /$opal_hwloc_hwloc2_basedir /hwloc/VERSION` "
147147
148148 # Build flags for our Makefile.am
149- opal_hwloc_hwloc201_LDFLAGS = ' $(HWLOC_EMBEDDED_LDFLAGS)'
150- opal_hwloc_hwloc201_LIBS = ' $(OPAL_TOP_BUILDDIR)/' " $opal_hwloc_hwloc201_basedir " ' /hwloc/hwloc/libhwloc_embedded.la $(HWLOC_EMBEDDED_LIBS)'
151- opal_hwloc_hwloc201_support = yes
149+ opal_hwloc_hwloc2_LDFLAGS = ' $(HWLOC_EMBEDDED_LDFLAGS)'
150+ opal_hwloc_hwloc2_LIBS = ' $(OPAL_TOP_BUILDDIR)/' " $opal_hwloc_hwloc2_basedir " ' /hwloc/hwloc/libhwloc_embedded.la $(HWLOC_EMBEDDED_LIBS)'
151+ opal_hwloc_hwloc2_support = yes
152152
153- AC_DEFINE_UNQUOTED([HWLOC_HWLOC201_HWLOC_VERSION ],
153+ AC_DEFINE_UNQUOTED([HWLOC_HWLOC2_HWLOC_VERSION ],
154154 [" $HWLOC_VERSION " ],
155155 [Version of hwloc])
156156
@@ -163,35 +163,35 @@ AC_DEFUN([MCA_opal_hwloc_hwloc201_CONFIG],[
163163 ],
164164 [AC_MSG_CHECKING([whether hwloc configure succeeded])
165165 AC_MSG_RESULT([no])
166- opal_hwloc_hwloc201_support = no])
167- CFLAGS= $opal_hwloc_hwloc201_save_cflags
166+ opal_hwloc_hwloc2_support = no])
167+ CFLAGS= $opal_hwloc_hwloc2_save_cflags
168168
169169 # Restore some env variables, if necessary
170- AS_IF([test -n " $opal_hwloc_hwloc201_save_cairo " ],
171- [enable_cairo= $opal_hwloc_hwloc201_save_cairo ])
172- AS_IF([test -n " $opal_hwloc_hwloc201_save_xml " ],
173- [enable_xml= $opal_hwloc_hwloc201_save_xml ])
174- AS_IF([test -n " $opal_hwloc_hwloc201_save_static " ],
175- [enable_static= $opal_hwloc_hwloc201_save_static ])
176- AS_IF([test -n " $opal_hwloc_hwloc201_save_shared " ],
177- [enable_shared= $opal_hwloc_hwloc201_save_shared ])
178- AS_IF([test -n " $opal_hwloc_hwloc201_save_plugins " ],
179- [enable_plugins= $opal_hwloc_hwloc201_save_shared ])
180-
181- CPPFLAGS= $opal_hwloc_hwloc201_save_CPPFLAGS
182- LDFLAGS= $opal_hwloc_hwloc201_save_LDFLAGS
183- LIBS= $opal_hwloc_hwloc201_save_LIBS
184-
185- AC_SUBST([opal_hwloc_hwloc201_CFLAGS ])
186- AC_SUBST([opal_hwloc_hwloc201_CPPFLAGS ])
187- AC_SUBST([opal_hwloc_hwloc201_LDFLAGS ])
188- AC_SUBST([opal_hwloc_hwloc201_LIBS ])
170+ AS_IF([test -n " $opal_hwloc_hwloc2_save_cairo " ],
171+ [enable_cairo= $opal_hwloc_hwloc2_save_cairo ])
172+ AS_IF([test -n " $opal_hwloc_hwloc2_save_xml " ],
173+ [enable_xml= $opal_hwloc_hwloc2_save_xml ])
174+ AS_IF([test -n " $opal_hwloc_hwloc2_save_static " ],
175+ [enable_static= $opal_hwloc_hwloc2_save_static ])
176+ AS_IF([test -n " $opal_hwloc_hwloc2_save_shared " ],
177+ [enable_shared= $opal_hwloc_hwloc2_save_shared ])
178+ AS_IF([test -n " $opal_hwloc_hwloc2_save_plugins " ],
179+ [enable_plugins= $opal_hwloc_hwloc2_save_shared ])
180+
181+ CPPFLAGS= $opal_hwloc_hwloc2_save_CPPFLAGS
182+ LDFLAGS= $opal_hwloc_hwloc2_save_LDFLAGS
183+ LIBS= $opal_hwloc_hwloc2_save_LIBS
184+
185+ AC_SUBST([opal_hwloc_hwloc2_CFLAGS ])
186+ AC_SUBST([opal_hwloc_hwloc2_CPPFLAGS ])
187+ AC_SUBST([opal_hwloc_hwloc2_LDFLAGS ])
188+ AC_SUBST([opal_hwloc_hwloc2_LIBS ])
189189
190190 # Finally, add some flags to the wrapper compiler so that our
191191 # headers can be found.
192- hwloc_hwloc201_WRAPPER_EXTRA_LDFLAGS = " $HWLOC_EMBEDDED_LDFLAGS "
193- hwloc_hwloc201_WRAPPER_EXTRA_LIBS = " $HWLOC_EMBEDDED_LIBS "
194- hwloc_hwloc201_WRAPPER_EXTRA_CPPFLAGS = ' -I${pkgincludedir}/' " $opal_hwloc_hwloc201_basedir /hwloc/include"
192+ hwloc_hwloc2_WRAPPER_EXTRA_LDFLAGS = " $HWLOC_EMBEDDED_LDFLAGS "
193+ hwloc_hwloc2_WRAPPER_EXTRA_LIBS = " $HWLOC_EMBEDDED_LIBS "
194+ hwloc_hwloc2_WRAPPER_EXTRA_CPPFLAGS = ' -I${pkgincludedir}/' " $opal_hwloc_hwloc2_basedir /hwloc/include"
195195
196196 # If we are not building the internal hwloc, then indicate that
197197 # this component should not be built. NOTE: we still did all the
@@ -201,12 +201,12 @@ AC_DEFUN([MCA_opal_hwloc_hwloc201_CONFIG],[
201201 # distclean" infrastructure to work properly).
202202 AS_IF([test " $opal_hwloc_external_support " = " yes" ],
203203 [AC_MSG_NOTICE([using an external hwloc; disqualifying this component])
204- opal_hwloc_hwloc201_support = no],
204+ opal_hwloc_hwloc2_support = no],
205205 [AC_DEFINE([HAVE_DECL_HWLOC_OBJ_OSDEV_COPROC], [1])
206206 AC_DEFINE([HAVE_HWLOC_TOPOLOGY_DUP], [1])])
207207
208208 # Done!
209- AS_IF([test " $opal_hwloc_hwloc201_support " = " yes" ],
209+ AS_IF([test " $opal_hwloc_hwloc2_support " = " yes" ],
210210 [$1 ],
211211 [$2 ])
212212
0 commit comments