@@ -19,7 +19,7 @@ dnl and Technology (RIST). All rights reserved.
1919dnl Copyright (c) 2016-2021 IBM Corporation. All rights reserved.
2020dnl Copyright (c) 2020 Triad National Security, LLC. All rights
2121dnl reserved.
22- dnl Copyright (c) 2020 Amazon.com, Inc. or its affiliates. All Rights
22+ dnl Copyright (c) 2020-2021 Amazon.com, Inc. or its affiliates. All Rights
2323dnl reserved.
2424dnl Copyright (c) 2021 Nanook Consulting. All rights reserved.
2525dnl $COPYRIGHT$
@@ -68,45 +68,53 @@ AC_DEFUN([OPAL_CONFIG_PMIX], [
6868
6969 internal_pmix_happy=0
7070 m4_ifdef ( [ package_pmix] ,
71- [ # always configure the internal pmix, so that
72- # make dist always works.
73- internal_pmix_args="--without-tests-examples --enable-pmix-binaries --disable-pmix-backward-compatibility --disable-visibility"
74- internal_pmix_libs=
75- internal_pmix_CPPFLAGS=
76-
77- OMPI_PMIX_ADD_ARGS
78-
79- AS_IF ( [ test "$opal_libevent_mode" = "internal"] ,
80- [ internal_pmix_args="$internal_pmix_args --with-libevent=cobuild"
81- internal_pmix_CPPFLAGS="$internal_pmix_CPPFLAGS $opal_libevent_CPPFLAGS"
82- internal_pmix_libs="$internal_pmix_libs $opal_libevent_LIBS"] )
83-
84- AS_IF ( [ test "$opal_hwloc_mode" = "internal"] ,
85- [ internal_pmix_args="$internal_pmix_args --with-hwloc=cobuild"
86- internal_pmix_CPPFLAGS="$internal_pmix_CPPFLAGS $opal_hwloc_CPPFLAGS"
87- internal_pmix_libs="$internal_pmix_libs $opal_hwloc_LIBS"] )
88-
89- AS_IF ( [ test ! -z "$internal_pmix_libs"] ,
90- [ internal_pmix_args="$internal_pmix_args --with-pmix-extra-lib=\"$internal_pmix_libs\""] )
91-
92- if test "$WANT_DEBUG" = "1"; then
93- internal_pmix_args="$internal_pmix_args --enable-debug"
94- fi
95-
96- # Pass all our compiler/linker flags to PMIx, so that it
97- # picks up how to build an internal HWLOC and libevent, plus
98- # picks up any user-specified compiler flags from the master
99- # configure run.
100- OPAL_SUBDIR_ENV_CLEAN([ opal_pmix_configure] )
101- AS_IF ( [ test -n "$internal_pmix_CPPFLAGS"] ,
102- [ OPAL_SUBDIR_ENV_APPEND([ CPPFLAGS] , [ $internal_pmix_CPPFLAGS] )] )
103- PAC_CONFIG_SUBDIR_ARGS([ 3rd-party/openpmix] , [ $internal_pmix_args] ,
104- [ [ --with-libevent=internal] , [ --with-hwloc=internal] ,
105- [ --with-libevent=external] , [ --with-hwloc=external] ,
106- [ --with-pmix=[ [ ^ ] ] *] , [ --with-platform=[ [ ^ ] ] *] ] ,
107- [ internal_pmix_happy=1] )
108- OPAL_SUBDIR_ENV_RESTORE([ opal_pmix_configure] )
109- OPAL_3RDPARTY_DIST_SUBDIRS="$OPAL_3RDPARTY_DIST_SUBDIRS openpmix"] )
71+ [ OMPI_PMIX_ADD_ARGS
72+ AS_IF ( [ test "$opal_pmix_mode" = "unspecified" -o "$opal_pmix_mode" = "internal"] ,
73+ [ # Run PMIx's configure script unless the user
74+ # explicitly asked us to use an external PMIX, so that
75+ # "make dist" includes PMIx in the dist tarball. This
76+ # does mean that "make dist" will not work if Open MPI
77+ # was configured to use an external PMIx library, but
78+ # we decided this was a reasonable tradeoff for not
79+ # having to deal with PMIx (or PRRTE) potentially
80+ # failing to configure in a situation where it isn't
81+ # desired.
82+
83+ internal_pmix_args="--without-tests-examples --enable-pmix-binaries --disable-pmix-backward-compatibility --disable-visibility"
84+ internal_pmix_libs=
85+ internal_pmix_CPPFLAGS=
86+
87+ AS_IF ( [ test "$opal_libevent_mode" = "internal"] ,
88+ [ internal_pmix_args="$internal_pmix_args --with-libevent=cobuild"
89+ internal_pmix_CPPFLAGS="$internal_pmix_CPPFLAGS $opal_libevent_CPPFLAGS"
90+ internal_pmix_libs="$internal_pmix_libs $opal_libevent_LIBS"] )
91+
92+ AS_IF ( [ test "$opal_hwloc_mode" = "internal"] ,
93+ [ internal_pmix_args="$internal_pmix_args --with-hwloc=cobuild"
94+ internal_pmix_CPPFLAGS="$internal_pmix_CPPFLAGS $opal_hwloc_CPPFLAGS"
95+ internal_pmix_libs="$internal_pmix_libs $opal_hwloc_LIBS"] )
96+
97+ AS_IF ( [ test ! -z "$internal_pmix_libs"] ,
98+ [ internal_pmix_args="$internal_pmix_args --with-pmix-extra-lib=\"$internal_pmix_libs\""] )
99+
100+ if test "$WANT_DEBUG" = "1"; then
101+ internal_pmix_args="$internal_pmix_args --enable-debug"
102+ fi
103+
104+ # Pass all our compiler/linker flags to PMIx, so that it
105+ # picks up how to build an internal HWLOC and libevent, plus
106+ # picks up any user-specified compiler flags from the master
107+ # configure run.
108+ OPAL_SUBDIR_ENV_CLEAN([ opal_pmix_configure] )
109+ AS_IF ( [ test -n "$internal_pmix_CPPFLAGS"] ,
110+ [ OPAL_SUBDIR_ENV_APPEND([ CPPFLAGS] , [ $internal_pmix_CPPFLAGS] )] )
111+ PAC_CONFIG_SUBDIR_ARGS([ 3rd-party/openpmix] , [ $internal_pmix_args] ,
112+ [ [ --with-libevent=internal] , [ --with-hwloc=internal] ,
113+ [ --with-libevent=external] , [ --with-hwloc=external] ,
114+ [ --with-pmix=[ [ ^ ] ] *] , [ --with-platform=[ [ ^ ] ] *] ] ,
115+ [ internal_pmix_happy=1] )
116+ OPAL_SUBDIR_ENV_RESTORE([ opal_pmix_configure] )
117+ OPAL_3RDPARTY_DIST_SUBDIRS="$OPAL_3RDPARTY_DIST_SUBDIRS openpmix"] ) ] )
110118
111119 # unless internal specifically requested by the user, try to find
112120 # an external that works.
0 commit comments