2016-08-25 18:05:03 +03: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-06 01:03:51 +03:00
|
|
|
# Copyright (c) 2010-2017 Cisco Systems, Inc. All rights reserved.
|
|
|
|
# Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
|
2016-08-25 18:05:03 +03:00
|
|
|
# Copyright (c) 2015-2016 Research Organization for Information Science
|
|
|
|
# and Technology (RIST). All rights reserved.
|
|
|
|
# $COPYRIGHT$
|
|
|
|
#
|
|
|
|
# Additional copyrights may follow
|
|
|
|
#
|
|
|
|
# $HEADER$
|
|
|
|
#
|
|
|
|
|
2016-12-03 01:27:15 +03:00
|
|
|
# MCA_pmix_pmix2x_CONFIG([action-if-found], [action-if-not-found])
|
2016-08-25 18:05:03 +03:00
|
|
|
# -----------------------------------------------------------
|
2016-12-03 01:27:15 +03:00
|
|
|
AC_DEFUN([MCA_opal_pmix_pmix2x_CONFIG],[
|
|
|
|
AC_CONFIG_FILES([opal/mca/pmix/pmix2x/Makefile])
|
2016-08-25 18:05:03 +03:00
|
|
|
|
2017-01-06 01:03:51 +03:00
|
|
|
OPAL_VAR_SCOPE_PUSH([PMIX_VERSION opal_pmix_pmix2x_save_CPPFLAGS opal_pmix_pmix2_save_CFLAGS opal_pmix_pmix2x_save_LDFLAGS opal_pmix_pmix2x_save_LIBS opal_pmix_pmix2x_basedir opal_pmix_pmix2x_args opal_pmix_pmix2x_happy opal_pmix_pmix2x_sm_flag pmix_pmix2x_status_filename])
|
2016-08-25 18:05:03 +03:00
|
|
|
|
2016-12-03 01:27:15 +03:00
|
|
|
opal_pmix_pmix2x_basedir=opal/mca/pmix/pmix2x
|
2016-08-25 18:05:03 +03:00
|
|
|
|
2016-12-03 01:27:15 +03:00
|
|
|
opal_pmix_pmix2x_save_CFLAGS=$CFLAGS
|
|
|
|
opal_pmix_pmix2x_save_CPPFLAGS=$CPPFLAGS
|
|
|
|
opal_pmix_pmix2x_save_LDFLAGS=$LDFLAGS
|
|
|
|
opal_pmix_pmix2x_save_LIBS=$LIBS
|
2016-08-25 18:05:03 +03:00
|
|
|
|
2016-12-03 07:33:03 +03:00
|
|
|
AC_ARG_ENABLE([pmix-dstore],
|
|
|
|
[AC_HELP_STRING([--enable-pmix-dstore],
|
2017-02-07 05:49:37 +03:00
|
|
|
[Enable PMIx shared memory data store (default: enabled)])])
|
2016-12-03 07:33:03 +03:00
|
|
|
AC_MSG_CHECKING([if PMIx shared memory data store is enabled])
|
2016-12-13 19:19:21 +03:00
|
|
|
if test "$enable_pmix_dstore" != "no"; then
|
2016-09-01 21:41:13 +03:00
|
|
|
AC_MSG_RESULT([yes])
|
2016-12-03 01:27:15 +03:00
|
|
|
opal_pmix_pmix2x_sm_flag=--enable-dstore
|
2016-09-01 21:41:13 +03:00
|
|
|
else
|
|
|
|
AC_MSG_RESULT([no (disabled)])
|
2016-12-03 01:27:15 +03:00
|
|
|
opal_pmix_pmix2x_sm_flag=--disable-dstore
|
2016-09-01 21:41:13 +03:00
|
|
|
fi
|
|
|
|
|
2017-04-07 22:15:46 +03:00
|
|
|
AC_ARG_ENABLE([pmix-timing],
|
|
|
|
[AC_HELP_STRING([--enable-pmix-timing],
|
|
|
|
[Enable PMIx timing measurements (default: disabled)])])
|
|
|
|
AC_MSG_CHECKING([if PMIx timing is enabled])
|
|
|
|
if test "$enable_pmix_timing" == "yes"; then
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
opal_pmix_pmix2x_timing_flag=--enable-pmix-timing
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT([no (disabled)])
|
|
|
|
opal_pmix_pmix2x_timing_flag=--disable-pmix-timing
|
|
|
|
fi
|
|
|
|
|
2017-05-04 20:01:41 +03:00
|
|
|
opal_pmix_pmix2x_args="--with-pmix-symbol-rename=OPAL_MCA_PMIX2X_ $opal_pmix_pmix2x_sm_flag $opal_pmix_pmix2x_timing_flag --without-tests-examples --disable-pmix-backward-compatibility --disable-visibility --enable-embedded-libevent --with-libevent-header=\\\"opal/mca/event/$opal_event_base_include\\\" --enable-embedded-mode"
|
2016-08-25 18:05:03 +03:00
|
|
|
AS_IF([test "$enable_debug" = "yes"],
|
2016-12-03 01:27:15 +03:00
|
|
|
[opal_pmix_pmix2x_args="--enable-debug $opal_pmix_pmix2x_args"
|
2016-08-25 18:05:03 +03:00
|
|
|
CFLAGS="$OPAL_CFLAGS_BEFORE_PICKY $OPAL_VISIBILITY_CFLAGS -g"],
|
2016-12-03 01:27:15 +03:00
|
|
|
[opal_pmix_pmix2x_args="--disable-debug $opal_pmix_pmix2x_args"
|
2016-08-25 18:05:03 +03:00
|
|
|
CFLAGS="$OPAL_CFLAGS_BEFORE_PICKY $OPAL_VISIBILITY_CFLAGS"])
|
2017-02-22 00:46:46 +03:00
|
|
|
AS_IF([test "$with_devel_headers" = "yes"],
|
|
|
|
[opal_pmix_pmix2x_args="--with-devel-headers $opal_pmix_pmix2x_args"],
|
2017-05-04 20:01:41 +03:00
|
|
|
[opal_pmix_pmix2x_args=$opal_pmix_pmix2x_args])
|
2016-08-25 18:05:03 +03:00
|
|
|
CPPFLAGS="-I$OPAL_TOP_SRCDIR -I$OPAL_TOP_BUILDDIR -I$OPAL_TOP_SRCDIR/opal/include -I$OPAL_TOP_BUILDDIR/opal/include $CPPFLAGS"
|
|
|
|
|
2016-12-03 01:27:15 +03:00
|
|
|
OPAL_CONFIG_SUBDIR([$opal_pmix_pmix2x_basedir/pmix],
|
|
|
|
[$opal_pmix_pmix2x_args $opal_subdir_args 'CFLAGS=$CFLAGS' 'CPPFLAGS=$CPPFLAGS'],
|
|
|
|
[opal_pmix_pmix2x_happy=1], [opal_pmix_pmix2x_happy=0])
|
2016-08-25 18:05:03 +03:00
|
|
|
|
2016-12-03 01:27:15 +03:00
|
|
|
CFLAGS=$opal_pmix_pmix2x_save_CFLAGS
|
|
|
|
CPPFLAGS=$opal_pmix_pmix2x_save_CPPFLAGS
|
|
|
|
LDFLAGS=$opal_pmix_pmix2x_save_LDFLAGS
|
|
|
|
LIBS=$opal_pmix_pmix2x_save_LIBS
|
2016-08-25 18:05:03 +03:00
|
|
|
|
|
|
|
# If we are not building the internal pmix, then check to see
|
2016-12-03 01:27:15 +03:00
|
|
|
# if we are linking to an external v2.x library. If not, then
|
2016-08-25 18:05:03 +03:00
|
|
|
# do not use this component. NOTE: we still did all the
|
|
|
|
# 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).
|
2016-12-03 01:27:15 +03:00
|
|
|
AC_MSG_CHECKING([if v2.x component is to be used])
|
2016-08-25 18:05:03 +03:00
|
|
|
AS_IF([test "$opal_external_pmix_happy" = "yes"],
|
2016-10-18 21:15:15 +03:00
|
|
|
[AC_MSG_RESULT([no - disqualifying this component])
|
2016-12-03 01:27:15 +03:00
|
|
|
opal_pmix_pmix2x_happy=0],
|
|
|
|
[AC_MSG_RESULT([yes - using the internal v2.x library])
|
2016-08-25 18:05:03 +03:00
|
|
|
# Build flags for our Makefile.am
|
2016-12-03 01:27:15 +03:00
|
|
|
opal_pmix_pmix2x_LDFLAGS=
|
2017-01-06 01:03:51 +03:00
|
|
|
opal_pmix_pmix2x_LIBS="$OPAL_TOP_BUILDDIR/$opal_pmix_pmix2x_basedir/pmix/src/libpmix.la"
|
|
|
|
opal_pmix_pmix2x_CPPFLAGS="-I$OPAL_TOP_BUILDDIR/$opal_pmix_pmix2x_basedir/pmix/include -I$OPAL_TOP_BUILDDIR/$opal_pmix_pmix2x_basedir/pmix -I$OPAL_TOP_SRCDIR/$opal_pmix_pmix2x_basedir/pmix/include -I$OPAL_TOP_SRCDIR/$opal_pmix_pmix2x_basedir/pmix"
|
|
|
|
opal_pmix_pmix2x_DEPENDENCIES="$OPAL_TOP_BUILDDIR/$opal_pmix_pmix2x_basedir/pmix/src/libpmix.la"])
|
2016-08-25 18:05:03 +03:00
|
|
|
|
2016-12-03 01:27:15 +03:00
|
|
|
AC_SUBST([opal_pmix_pmix2x_LIBS])
|
|
|
|
AC_SUBST([opal_pmix_pmix2x_CPPFLAGS])
|
|
|
|
AC_SUBST([opal_pmix_pmix2x_LDFLAGS])
|
|
|
|
AC_SUBST([opal_pmix_pmix2x_DEPENDENCIES])
|
2016-08-25 18:05:03 +03:00
|
|
|
|
2017-01-06 01:03:51 +03:00
|
|
|
# Finally, add some flags to the wrapper compiler so that our
|
|
|
|
# headers can be found.
|
|
|
|
pmix_pmix2x_status_filename="$OPAL_TOP_BUILDDIR/$opal_pmix_pmix2x_basedir/pmix/config.status"
|
|
|
|
pmix_pmix2x_WRAPPER_EXTRA_CPPFLAGS=`egrep PMIX_EMBEDDED_CPPFLAGS $pmix_pmix2x_status_filename | cut -d\" -f4`
|
|
|
|
pmix_pmix2x_WRAPPER_EXTRA_LDFLAGS=`egrep PMIX_EMBEDDED_LDFLAGS $pmix_pmix2x_status_filename | cut -d\" -f4`
|
|
|
|
pmix_pmix2x_WRAPPER_EXTRA_LIBS=`egrep PMIX_EMBEDDED_LIBS $pmix_pmix2x_status_filename | cut -d\" -f4`
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([PMIx extra wrapper CPPFLAGS])
|
|
|
|
AC_MSG_RESULT([$pmix_pmix2x_WRAPPER_EXTRA_CPPFLAGS])
|
|
|
|
AC_MSG_CHECKING([PMIx extra wrapper LDFLAGS])
|
|
|
|
AC_MSG_RESULT([$pmix_pmix2x_WRAPPER_EXTRA_LDFLAGS])
|
|
|
|
AC_MSG_CHECKING([PMIx extra wrapper LIBS])
|
|
|
|
AC_MSG_RESULT([$pmix_pmix2x_WRAPPER_EXTRA_LIBS])
|
|
|
|
|
2016-12-03 01:27:15 +03:00
|
|
|
AS_IF([test $opal_pmix_pmix2x_happy -eq 1],
|
2016-08-25 18:05:03 +03:00
|
|
|
[$1],
|
|
|
|
[$2])
|
|
|
|
|
|
|
|
OPAL_VAR_SCOPE_POP
|
|
|
|
])dnl
|