2016-08-25 08:05:03 -07:00
|
|
|
# -*- shell-script -*-
|
|
|
|
#
|
|
|
|
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
|
|
|
# University Research and Technology
|
|
|
|
# Corporation. All rights reserved.
|
|
|
|
# Copyright (c) 2004-2005 The University of Tennessee and The University
|
|
|
|
# of Tennessee Research Foundation. All rights
|
|
|
|
# reserved.
|
|
|
|
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
# University of Stuttgart. All rights reserved.
|
|
|
|
# Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
# All rights reserved.
|
|
|
|
# Copyright (c) 2011-2013 Los Alamos National Security, LLC.
|
|
|
|
# All rights reserved.
|
2017-01-05 14:03:51 -08:00
|
|
|
# Copyright (c) 2010-2017 Cisco Systems, Inc. All rights reserved.
|
2020-02-15 08:40:56 -08:00
|
|
|
# Copyright (c) 2013-2020 Intel, Inc. All rights reserved.
|
2016-08-25 08:05:03 -07:00
|
|
|
# Copyright (c) 2015-2016 Research Organization for Information Science
|
|
|
|
# and Technology (RIST). All rights reserved.
|
|
|
|
# $COPYRIGHT$
|
|
|
|
#
|
|
|
|
# Additional copyrights may follow
|
|
|
|
#
|
|
|
|
# $HEADER$
|
|
|
|
#
|
|
|
|
|
2019-12-12 11:52:28 +09:00
|
|
|
#
|
|
|
|
# Priority
|
|
|
|
#
|
|
|
|
AC_DEFUN([MCA_opal_pmix_pmix4x_PRIORITY], [80])
|
|
|
|
|
|
|
|
#
|
|
|
|
# Force this component to compile in static-only mode
|
|
|
|
#
|
|
|
|
AC_DEFUN([MCA_opal_pmix_pmix4x_COMPILE_MODE], [
|
|
|
|
AC_MSG_CHECKING([for MCA component $2:$3 compile mode])
|
|
|
|
$4="static"
|
|
|
|
AC_MSG_RESULT([$$4])
|
|
|
|
])
|
|
|
|
|
|
|
|
# MCA_pmix_pmix4x_POST_CONFIG()
|
|
|
|
# ---------------------------------
|
|
|
|
AC_DEFUN([MCA_opal_pmix_pmix4x_POST_CONFIG],[
|
|
|
|
OPAL_VAR_SCOPE_PUSH([opal_pmix_pmix4x_basedir])
|
|
|
|
|
|
|
|
# If we won, then do all the rest of the setup
|
|
|
|
AS_IF([test "$1" = "1" && test "$opal_pmix_pmix4x_happy" = "1"],
|
|
|
|
[
|
|
|
|
# Set this variable so that the framework m4 knows what
|
|
|
|
# file to include in opal/mca/pmix/pmix-internal.h
|
|
|
|
opal_pmix_pmix4x_basedir=opal/mca/pmix/pmix4x
|
|
|
|
opal_pmix_base_include="$opal_pmix_pmix4x_basedir/pmix4x.h"
|
|
|
|
|
|
|
|
# Add some stuff to CPPFLAGS so that the rest of the source
|
|
|
|
# tree can be built
|
|
|
|
file=$opal_pmix_pmix4x_basedir/openpmix
|
|
|
|
CPPFLAGS="-I$OPAL_TOP_SRCDIR/$file/include $CPPFLAGS"
|
|
|
|
AS_IF([test "$OPAL_TOP_BUILDDIR" != "$OPAL_TOP_SRCDIR"],
|
|
|
|
[CPPFLAGS="-I$OPAL_TOP_BUILDDIR/$file/include $CPPFLAGS"])
|
|
|
|
unset file
|
|
|
|
])
|
|
|
|
OPAL_VAR_SCOPE_POP
|
|
|
|
|
|
|
|
# This must be run unconditionally
|
|
|
|
# PMIX_DO_AM_CONDITIONALS
|
|
|
|
])dnl
|
|
|
|
|
|
|
|
|
2018-09-12 19:20:24 -07:00
|
|
|
# MCA_pmix_pmix4x_CONFIG([action-if-found], [action-if-not-found])
|
2016-08-25 08:05:03 -07:00
|
|
|
# -----------------------------------------------------------
|
2018-09-12 19:20:24 -07:00
|
|
|
AC_DEFUN([MCA_opal_pmix_pmix4x_CONFIG],[
|
|
|
|
AC_CONFIG_FILES([opal/mca/pmix/pmix4x/Makefile])
|
2016-08-25 08:05:03 -07:00
|
|
|
|
2019-12-12 11:52:28 +09:00
|
|
|
OPAL_VAR_SCOPE_PUSH([PMIX_VERSION opal_pmix_pmix4x_save_CPPFLAGS opal_pmix_pmix2_save_CFLAGS opal_pmix_pmix4x_save_LDFLAGS opal_pmix_pmix4x_save_LIBS opal_pmix_pmix4x_basedir opal_pmix_pmix4x_args pmix_pmix4x_status_filename])
|
2016-08-25 08:05:03 -07:00
|
|
|
|
2018-09-12 19:20:24 -07:00
|
|
|
opal_pmix_pmix4x_basedir=opal/mca/pmix/pmix4x
|
2016-08-25 08:05:03 -07:00
|
|
|
|
2018-09-12 19:20:24 -07:00
|
|
|
opal_pmix_pmix4x_save_CFLAGS=$CFLAGS
|
|
|
|
opal_pmix_pmix4x_save_CPPFLAGS=$CPPFLAGS
|
|
|
|
opal_pmix_pmix4x_save_LDFLAGS=$LDFLAGS
|
|
|
|
opal_pmix_pmix4x_save_LIBS=$LIBS
|
2016-08-25 08:05:03 -07:00
|
|
|
|
2017-04-07 12:15:46 -07:00
|
|
|
AC_ARG_ENABLE([pmix-timing],
|
|
|
|
[AC_HELP_STRING([--enable-pmix-timing],
|
|
|
|
[Enable PMIx timing measurements (default: disabled)])])
|
2020-02-15 08:40:56 -08:00
|
|
|
AC_ARG_WITH([pmix-platform],
|
|
|
|
[AC_HELP_STRING([--with-pmix-platform],
|
|
|
|
[Platform file to use when building the internal PMIx support])])
|
|
|
|
|
2017-04-07 12:15:46 -07:00
|
|
|
AC_MSG_CHECKING([if PMIx timing is enabled])
|
2017-08-03 21:21:26 -07:00
|
|
|
if test "$enable_pmix_timing" = "yes"; then
|
2017-04-07 12:15:46 -07:00
|
|
|
AC_MSG_RESULT([yes])
|
2018-09-12 19:20:24 -07:00
|
|
|
opal_pmix_pmix4x_timing_flag=--enable-pmix-timing
|
2017-04-07 12:15:46 -07:00
|
|
|
else
|
|
|
|
AC_MSG_RESULT([no (disabled)])
|
2018-09-12 19:20:24 -07:00
|
|
|
opal_pmix_pmix4x_timing_flag=--disable-pmix-timing
|
2017-04-07 12:15:46 -07:00
|
|
|
fi
|
|
|
|
|
2019-12-12 11:52:28 +09:00
|
|
|
opal_pmix_pmix4x_args="$opal_pmix_pmix4x_timing_flag --without-tests-examples --with-pmix-symbol-rename=OPAL_MCA_PMIX4X_ --disable-pmix-binaries --disable-pmix-backward-compatibility --disable-visibility --enable-embedded-mode --with-libevent-header=\\\"opal/mca/event/event.h\\\" --with-hwloc-header=\\\"opal/mca/hwloc/hwloc-internal.h\\\""
|
2016-08-25 08:05:03 -07:00
|
|
|
AS_IF([test "$enable_debug" = "yes"],
|
2018-09-12 19:20:24 -07:00
|
|
|
[opal_pmix_pmix4x_args="--enable-debug $opal_pmix_pmix4x_args"
|
2016-08-25 08:05:03 -07:00
|
|
|
CFLAGS="$OPAL_CFLAGS_BEFORE_PICKY $OPAL_VISIBILITY_CFLAGS -g"],
|
2018-09-12 19:20:24 -07:00
|
|
|
[opal_pmix_pmix4x_args="--disable-debug $opal_pmix_pmix4x_args"
|
2016-08-25 08:05:03 -07:00
|
|
|
CFLAGS="$OPAL_CFLAGS_BEFORE_PICKY $OPAL_VISIBILITY_CFLAGS"])
|
2017-02-21 13:46:46 -08:00
|
|
|
AS_IF([test "$with_devel_headers" = "yes"],
|
2018-09-12 19:20:24 -07:00
|
|
|
[opal_pmix_pmix4x_args="--with-devel-headers $opal_pmix_pmix4x_args"])
|
2020-02-15 08:40:56 -08:00
|
|
|
if test ! -z $with_pmix_platform && test "$with_pix_platform" != "yes"; then
|
|
|
|
opal_pmix_pmix4x_args="$opal_pmix_pmix4x_args --with-platform=$with_pmix_platform"
|
|
|
|
fi
|
2016-08-25 08:05:03 -07:00
|
|
|
CPPFLAGS="-I$OPAL_TOP_SRCDIR -I$OPAL_TOP_BUILDDIR -I$OPAL_TOP_SRCDIR/opal/include -I$OPAL_TOP_BUILDDIR/opal/include $CPPFLAGS"
|
|
|
|
|
2019-10-01 13:36:51 +09:00
|
|
|
OPAL_CONFIG_SUBDIR([$opal_pmix_pmix4x_basedir/openpmix],
|
2018-09-12 19:20:24 -07:00
|
|
|
[$opal_pmix_pmix4x_args $opal_subdir_args 'CFLAGS=$CFLAGS' 'CPPFLAGS=$CPPFLAGS'],
|
|
|
|
[opal_pmix_pmix4x_happy=1], [opal_pmix_pmix4x_happy=0])
|
2016-08-25 08:05:03 -07:00
|
|
|
|
2018-09-12 19:20:24 -07:00
|
|
|
CFLAGS=$opal_pmix_pmix4x_save_CFLAGS
|
|
|
|
CPPFLAGS=$opal_pmix_pmix4x_save_CPPFLAGS
|
|
|
|
LDFLAGS=$opal_pmix_pmix4x_save_LDFLAGS
|
|
|
|
LIBS=$opal_pmix_pmix4x_save_LIBS
|
2016-08-25 08:05:03 -07:00
|
|
|
|
2018-07-09 21:02:32 -07:00
|
|
|
# See if we are using the internal version. NOTE: we still did all the
|
2016-08-25 08:05:03 -07:00
|
|
|
# above configury so that all the proper GNU Autotools
|
|
|
|
# infrastructure is setup properly (e.g., w.r.t. SUBDIRS=pmix in
|
|
|
|
# this directory's Makefile.am, we still need the Autotools "make
|
|
|
|
# distclean" infrastructure to work properly).
|
2018-09-12 19:20:24 -07:00
|
|
|
AC_MSG_CHECKING([if v4.x component is to be used])
|
2016-08-25 08:05:03 -07:00
|
|
|
AS_IF([test "$opal_external_pmix_happy" = "yes"],
|
2016-10-18 11:15:15 -07:00
|
|
|
[AC_MSG_RESULT([no - disqualifying this component])
|
2018-09-12 19:20:24 -07:00
|
|
|
opal_pmix_pmix4x_happy=0],
|
|
|
|
[AC_MSG_RESULT([yes - using the internal v4.x library])
|
2018-10-05 06:29:36 -07:00
|
|
|
AS_IF([test "$opal_pmix_pmix4x_happy" = "0"],
|
|
|
|
[AC_MSG_WARN([INTERNAL PMIX FAILED TO CONFIGURE])
|
|
|
|
AC_MSG_ERROR([CANNOT CONTINUE])])
|
2016-08-25 08:05:03 -07:00
|
|
|
# Build flags for our Makefile.am
|
2018-09-12 19:20:24 -07:00
|
|
|
opal_pmix_pmix4x_LDFLAGS=
|
2019-10-01 13:36:51 +09:00
|
|
|
opal_pmix_pmix4x_LIBS="$OPAL_TOP_BUILDDIR/$opal_pmix_pmix4x_basedir/openpmix/src/libpmix.la"
|
|
|
|
opal_pmix_pmix4x_CPPFLAGS="-I$OPAL_TOP_BUILDDIR/$opal_pmix_pmix4x_basedir/openpmix/include -I$OPAL_TOP_BUILDDIR/$opal_pmix_pmix4x_basedir/openpmix -I$OPAL_TOP_SRCDIR/$opal_pmix_pmix4x_basedir/openpmix/include -I$OPAL_TOP_SRCDIR/$opal_pmix_pmix4x_basedir/openpmix"
|
|
|
|
opal_pmix_pmix4x_DEPENDENCIES="$OPAL_TOP_BUILDDIR/$opal_pmix_pmix4x_basedir/openpmix/src/libpmix.la"])
|
2016-08-25 08:05:03 -07:00
|
|
|
|
2018-09-12 19:20:24 -07:00
|
|
|
AC_SUBST([opal_pmix_pmix4x_LIBS])
|
|
|
|
AC_SUBST([opal_pmix_pmix4x_CPPFLAGS])
|
|
|
|
AC_SUBST([opal_pmix_pmix4x_LDFLAGS])
|
|
|
|
AC_SUBST([opal_pmix_pmix4x_DEPENDENCIES])
|
2016-08-25 08:05:03 -07:00
|
|
|
|
2017-01-05 14:03:51 -08:00
|
|
|
# Finally, add some flags to the wrapper compiler so that our
|
|
|
|
# headers can be found.
|
2019-10-01 13:36:51 +09:00
|
|
|
pmix_pmix4x_status_filename="$OPAL_TOP_BUILDDIR/$opal_pmix_pmix4x_basedir/openpmix/config.status"
|
2018-09-12 19:20:24 -07:00
|
|
|
pmix_pmix4x_WRAPPER_EXTRA_CPPFLAGS=`egrep PMIX_EMBEDDED_CPPFLAGS $pmix_pmix4x_status_filename | cut -d\" -f4`
|
|
|
|
pmix_pmix4x_WRAPPER_EXTRA_LDFLAGS=`egrep PMIX_EMBEDDED_LDFLAGS $pmix_pmix4x_status_filename | cut -d\" -f4`
|
|
|
|
pmix_pmix4x_WRAPPER_EXTRA_LIBS=`egrep PMIX_EMBEDDED_LIBS $pmix_pmix4x_status_filename | cut -d\" -f4`
|
2017-01-05 14:03:51 -08:00
|
|
|
|
|
|
|
AC_MSG_CHECKING([PMIx extra wrapper CPPFLAGS])
|
2018-09-12 19:20:24 -07:00
|
|
|
AC_MSG_RESULT([$pmix_pmix4x_WRAPPER_EXTRA_CPPFLAGS])
|
2017-01-05 14:03:51 -08:00
|
|
|
AC_MSG_CHECKING([PMIx extra wrapper LDFLAGS])
|
2018-09-12 19:20:24 -07:00
|
|
|
AC_MSG_RESULT([$pmix_pmix4x_WRAPPER_EXTRA_LDFLAGS])
|
2017-01-05 14:03:51 -08:00
|
|
|
AC_MSG_CHECKING([PMIx extra wrapper LIBS])
|
2018-09-12 19:20:24 -07:00
|
|
|
AC_MSG_RESULT([$pmix_pmix4x_WRAPPER_EXTRA_LIBS])
|
2017-01-05 14:03:51 -08:00
|
|
|
|
2018-09-12 19:20:24 -07:00
|
|
|
AS_IF([test $opal_pmix_pmix4x_happy -eq 1],
|
2016-08-25 08:05:03 -07:00
|
|
|
[$1],
|
|
|
|
[$2])
|
|
|
|
|
|
|
|
OPAL_VAR_SCOPE_POP
|
|
|
|
])dnl
|