From b1b7097cd4ef47ab8136b9e2c93857a042a3015b Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Tue, 10 May 2016 07:31:33 -0700 Subject: [PATCH] hwloc/external: set WRAPPER_EXTRA_* vars in proper location WRAPPER_EXTRA flags are checked *before* the POST_CONFIG macro is invoked. So set them in the main CONFIG macro. Signed-off-by: Jeff Squyres (cherry picked from commit open-mpi/ompi@eccf0ff4cd759aed8eb185d66c1cde5431e4e372) --- opal/mca/hwloc/external/configure.m4 | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/opal/mca/hwloc/external/configure.m4 b/opal/mca/hwloc/external/configure.m4 index 07868e8d4e..31fd1e3c0e 100644 --- a/opal/mca/hwloc/external/configure.m4 +++ b/opal/mca/hwloc/external/configure.m4 @@ -1,6 +1,6 @@ # -*- shell-script -*- # -# Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2009-2016 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2014 Research Organization for Information Science # and Technology (RIST). All rights reserved. # @@ -67,16 +67,6 @@ AC_DEFUN([MCA_opal_hwloc_external_POST_CONFIG],[ AC_DEFINE_UNQUOTED(MCA_hwloc_external_openfabrics_header, ["$opal_hwloc_dir/include/hwloc/openfabrics-verbs.h"], [Location of external hwloc header]) - - # These flags need to get passed to the wrapper compilers - # (this is unnecessary for the internal/embedded hwloc) - - # Finally, add some flags to the wrapper compiler if we're - # building with developer headers so that our headers can - # be found. - hwloc_external_WRAPPER_EXTRA_CPPFLAGS=$opal_hwloc_external_CPPFLAGS - hwloc_external_WRAPPER_EXTRA_LDFLAGS=$opal_hwloc_external_LDFLAGS - hwloc_external_WRAPPER_EXTRA_LIBS=$opal_hwloc_external_LIBS ]) OPAL_VAR_SCOPE_POP ])dnl @@ -183,6 +173,17 @@ AC_DEFUN([MCA_opal_hwloc_external_CONFIG],[ AC_MSG_ERROR([Cannot continue])]) AS_IF([test "$opal_hwloc_dir" != ""], [CFLAGS=$opal_hwloc_external_CFLAGS_save]) + + # These flags need to get passed to the wrapper compilers + # (this is unnecessary for the internal/embedded hwloc) + + # Finally, add some flags to the wrapper compiler if we're + # building with developer headers so that our headers can + # be found. + hwloc_external_WRAPPER_EXTRA_CPPFLAGS=$opal_hwloc_external_CPPFLAGS + hwloc_external_WRAPPER_EXTRA_LDFLAGS=$opal_hwloc_external_LDFLAGS + hwloc_external_WRAPPER_EXTRA_LIBS=$opal_hwloc_external_LIBS + $1], [$2])