From 4e5f432786d1ab99304e40dadec40ac45e93e76f Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Wed, 8 Aug 2018 09:58:49 -0700 Subject: [PATCH 1/2] hwloc201: only configure if hwloc:external fails We know that hwloc:external will be configured first (because of its priority). Take advantage of that here in hwloc201 by having it refuse to configure / politely fail if hwloc:external succeeded. Also print out some additional lines in configure output indicating what is going on (i.e., hwloc:external succeeded, so this component will be skipped, or hwloc:external failed, so this component will be used). Signed-off-by: Jeff Squyres --- opal/mca/hwloc/hwloc201/configure.m4 | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/opal/mca/hwloc/hwloc201/configure.m4 b/opal/mca/hwloc/hwloc201/configure.m4 index 33f55b0d442..9da91b2c958 100644 --- a/opal/mca/hwloc/hwloc201/configure.m4 +++ b/opal/mca/hwloc/hwloc201/configure.m4 @@ -1,6 +1,6 @@ # -*- shell-script -*- # -# Copyright (c) 2009-2017 Cisco Systems, Inc. All rights reserved +# Copyright (c) 2009-2018 Cisco Systems, Inc. All rights reserved # Copyright (c) 2014-2017 Intel, Inc. All rights reserved. # Copyright (c) 2015-2018 Research Organization for Information Science # and Technology (RIST). All rights reserved. @@ -69,6 +69,21 @@ AC_DEFUN([MCA_opal_hwloc_hwloc201_POST_CONFIG],[ # MCA_hwloc_hwloc201_CONFIG([action-if-found], [action-if-not-found]) # -------------------------------------------------------------------- AC_DEFUN([MCA_opal_hwloc_hwloc201_CONFIG],[ + # We know that the external hwloc component will be configured + # before this one because of its priority. This component is only + # needed if the external component was not successful in selecting + # itself. + AC_MSG_CHECKING([if hwloc external component succeeded]) + AS_IF([test "$opal_hwloc_external_support" = "yes"], + [AC_MSG_RESULT([yes]) + AC_MSG_NOTICE([hwloc:external succeeded, so this component will be skipped]) + $2], + [AC_MSG_RESULT([no]) + AC_MSG_NOTICE([hwloc:external failed, so this component will be used]) + MCA_opal_hwloc_hwloc201_BACKEND_CONFIG($1, $2)]) +]) + +AC_DEFUN([MCA_opal_hwloc_hwloc201_BACKEND_CONFIG],[ # Hwloc needs to know if we have Verbs support AC_REQUIRE([OPAL_CHECK_VERBS_DIR]) @@ -80,19 +95,11 @@ AC_DEFUN([MCA_opal_hwloc_hwloc201_CONFIG],[ opal_hwloc_hwloc201_basedir=opal/mca/hwloc/hwloc201 opal_hwloc_hwloc201_support=no - AS_IF([test "$with_hwloc" = "internal" || test -z "$with_hwloc" || test "$with_hwloc" = "yes"], - [opal_hwloc_external="no"], - [opal_hwloc_external="yes"]) - opal_hwloc_hwloc201_save_CPPFLAGS=$CPPFLAGS opal_hwloc_hwloc201_save_LDFLAGS=$LDFLAGS opal_hwloc_hwloc201_save_LIBS=$LIBS - # Run the hwloc configuration - if no external hwloc, then set the prefixi - # to minimize the chance that someone will use the internal symbols - AS_IF([test "$opal_hwloc_external" = "no" && - test "$with_hwloc" != "future"], - [HWLOC_SET_SYMBOL_PREFIX([opal_hwloc201_])]) + HWLOC_SET_SYMBOL_PREFIX([opal_hwloc201_]) # save XML or graphical options opal_hwloc_hwloc201_save_cairo=$enable_cairo From b063cb6b0f251052dc72d2496e5745ce83d6b869 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Wed, 8 Aug 2018 10:04:16 -0700 Subject: [PATCH 2/2] libevent2022: only configure if event:external fails We know that event:external will be configured first (because of its priority). Take advantage of that here in libevent2022 by having it refuse to configure / politely fail if event:external succeeded. Also print out some additional lines in configure output indicating what is going on (i.e., event:external succeeded, so this component will be skipped, or event:external failed, so this component will be used). Signed-off-by: Jeff Squyres --- opal/mca/event/libevent2022/configure.m4 | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/opal/mca/event/libevent2022/configure.m4 b/opal/mca/event/libevent2022/configure.m4 index 81ffb3ca82b..2d67735ddcb 100644 --- a/opal/mca/event/libevent2022/configure.m4 +++ b/opal/mca/event/libevent2022/configure.m4 @@ -1,6 +1,6 @@ # -*- shell-script -*- # -# Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2009-2018 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights reserved. # Copyright (c) 2015 Intel, Inc. All rights reserved. # Copyright (c) 2015-2016 Research Organization for Information Science @@ -86,6 +86,21 @@ EOF # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([MCA_opal_event_libevent2022_CONFIG],[ + # We know that the external event component will be configured + # before this one because of its priority. This component is only + # needed if the external component was not successful in selecting + # itself. + AC_MSG_CHECKING([if event external component succeeded]) + AS_IF([test "$opal_event_external_support" = "yes"], + [AC_MSG_RESULT([yes]) + AC_MSG_NOTICE([event:external succeeded, so this component will be skipped]) + $2], + [AC_MSG_RESULT([no]) + AC_MSG_NOTICE([event:external failed, so this component will be used]) + MCA_opal_event_libevent2022_BACKEND_CONFIG($1, $2)]) +]) + +AC_DEFUN([MCA_opal_event_libevent2022_BACKEND_CONFIG],[ OPAL_VAR_SCOPE_PUSH([CFLAGS_save CPPFLAGS_save libevent_file event_args libevent_happy]) AC_CONFIG_FILES([opal/mca/event/libevent2022/Makefile])