@@ -38,7 +38,7 @@ dnl results of the build.
3838AC_DEFUN ( [ OMPI_SETUP_PRRTE] ,[
3939 AC_REQUIRE ( [ AC_PROG_LN_S ] )
4040
41- OPAL_VAR_SCOPE_PUSH([ prrte_setup_internal_happy prrte_setup_external_happy target_rst_dir] )
41+ OPAL_VAR_SCOPE_PUSH([ prrte_setup_internal_happy target_rst_dir] )
4242
4343 opal_show_subtitle "Configuring PRRTE"
4444
@@ -61,10 +61,16 @@ OPAL_VAR_SCOPE_PUSH([prrte_setup_internal_happy prrte_setup_external_happy targe
6161 [ AS_HELP_STRING ( [ --with-prrte-bindir=DIR] ,
6262 [ Search for PRRTE binaries in DIR. Defaults to PRRTE_DIR/bin if not specified] ) ] )
6363
64+ # Checking if invalid --with-prrte args. We only want to accept yes, no, or --with-prrte.
65+ # We no longer support external prrte builds so we let the user know if
66+ # they provide an external prrte path.
6467 prrte_setup_internal_happy=0
68+ AS_IF ( [ test "$with_prrte" != "yes" -a "$with_prrte" != "no" -a "$with_prrte" != ""] ,
69+ AC_MSG_ERROR ( [ "--with-prrte option defaults to "yes" and supports "yes" or "no". External PRRTE builds are no longer supported.] ) )
70+
6571 m4_ifdef ( [ package_prrte] ,
6672 [ OMPI_PRRTE_ADD_ARGS
67- AS_IF ( [ test "$opal_prrte_mode " = "unspecified " -o "$opal_prrte_mode " = "internal "] ,
73+ AS_IF ( [ test "$with_prrte " = "yes " -o "$with_prrte " = ""] ,
6874 [ # Run PRRTE's configure script unless the user
6975 # explicitly asked us to use an external PMIX, so that
7076 # "make dist" includes PRRTE in the dist tarball. This
@@ -74,40 +80,35 @@ OPAL_VAR_SCOPE_PUSH([prrte_setup_internal_happy prrte_setup_external_happy targe
7480 # having to deal with PRRTE (or PMIx) potentially
7581 # failing to configure in a situation where it isn't
7682 # desired.
83+ opal_prrte_mode="internal"
7784 _OMPI_SETUP_PRRTE_INTERNAL([ prrte_setup_internal_happy=1] ,
7885 [ prrte_setup_internal_happy=0] )] )
7986
87+ AM_CONDITIONAL([ OMPI_WANT_PRRTE] ,
88+ [ test "$prrte_setup_internal_happy" = "1"] )
89+
90+ AM_CONDITIONAL(OMPI_HAVE_PRRTE_RST, [ test $OMPI_HAVE_PRRTE_RST -eq 1] )
91+
8092 # if we have a pmix package and configure did not complete
8193 # successfully (or wasn't started), then disable make dist.
8294 AS_IF ( [ test $prrte_setup_internal_happy != 1] ,
83- [ OPAL_MAKEDIST_DISABLE="$OPAL_MAKEDIST_DISABLE PRRTE"] ) ] )
84-
85- # unless internal specifically requested by the user, try to find
86- # an external that works.
87- prrte_setup_external_happy=0
88- AS_IF ( [ test "$opal_prrte_mode" != "internal" -o "$opal_prrte_mode" != "disabled"] ,
89- [ _OMPI_SETUP_PRRTE_EXTERNAL(
90- [ prrte_setup_external_happy=1
91- opal_prrte_mode="external"] ,
92- [ AS_IF ( [ test "$opal_prrte_mode" = "external"] ,
93- [ AC_MSG_ERROR ( [ External PRRTE requested but not found.] ) ] ) ] )] )
94-
95- # external did not work out and customer did not specify external,
96- # so try the internal version.
97- AS_IF ( [ test "$prrte_setup_external_happy" = "0" -a "$prrte_setup_internal_happy" = "1"] ,
95+ [ OPAL_MAKEDIST_DISABLE="$OPAL_MAKEDIST_DISABLE PRRTE"] ) ] ) ] )
96+
97+ # try the internal version.
98+ AS_IF ( [ test "$prrte_setup_internal_happy" = "1"] ,
9899 [ opal_prrte_mode="internal"
99100 OMPI_USING_INTERNAL_PRRTE=1
100101 _OMPI_SETUP_PRRTE_INTERNAL_POST()] ,
101102 [ OMPI_USING_INTERNAL_PRRTE=0] )
102103
103104 AS_IF ( [ test "$opal_prrte_mode" != "disabled"] ,
104- [ AS_IF ( [ test "$prrte_setup_external_happy" = "0" -a "$ prrte_setup_internal_happy" = "0"] ,
105+ [ AS_IF ( [ test "$prrte_setup_internal_happy" = "0"] ,
105106 [ AC_MSG_ERROR ( [ Could not find viable prrte build.] ) ] )
106107 OMPI_HAVE_PRRTE=1] ,
107108 [ OMPI_HAVE_PRRTE=0] )
108109
109110 AM_CONDITIONAL([ OMPI_WANT_PRRTE] ,
110- [ test "$prrte_setup_internal_happy" = "1" -o "$prrte_setup_external_happy" = "1" ] )
111+ [ test "$prrte_setup_internal_happy" = "1"] )
111112
112113 AC_DEFINE_UNQUOTED ( [ OMPI_HAVE_PRRTE] ,
113114 [ $OMPI_HAVE_PRRTE] ,
@@ -264,77 +265,3 @@ dnl succeeded.
264265AC_DEFUN ( [ _OMPI_SETUP_PRRTE_INTERNAL_POST] , [
265266 OPAL_3RDPARTY_SUBDIRS="$OPAL_3RDPARTY_SUBDIRS prrte"
266267] )
267-
268-
269- dnl _OMPI_SETUP_PRRTE_EXTERNAL([action if success], [action if not success])
270- dnl
271- dnl Try to find an external prrte with sufficient version.
272- AC_DEFUN ( [ _OMPI_SETUP_PRRTE_EXTERNAL] , [
273- OPAL_VAR_SCOPE_PUSH([ ompi_prte_min_version ompi_prte_min_num_version setup_prrte_external_happy opal_prrte_CPPFLAGS_save] )
274-
275- opal_prrte_CPPFLAGS_save=$CPPFLAGS
276-
277- AS_IF ( [ test -n "${with_prrte}" -a "${with_prrte}" != "yes" -a "${with_prrte}" != "no"] ,
278- [ OPAL_FLAGS_APPEND_UNIQ([ CPPFLAGS] , [ "-I${with_prrte}/include"] )] )
279-
280- AC_CHECK_HEADER ( [ prte.h] , [ setup_prrte_external_happy=yes] ,
281- [ setup_prrte_external_happy=no] )
282-
283- ompi_prte_min_version=OMPI_PRTE_MIN_VERSION
284- ompi_prte_min_num_version=OMPI_PRTE_NUMERIC_MIN_VERSION
285- AS_IF ( [ test "${setup_prrte_external_happy}" = "yes"] ,
286- [ AC_CACHE_CHECK ( [ if external PRRTE version is OMPI_PRTE_MIN_VERSION or greater] ,
287- [ ompi_setup_prrte_cv_version_happy] ,
288- [ AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [ #include <prte_version.h>
289- ] ] , [ [
290- #if PRTE_NUMERIC_VERSION < $ompi_prte_min_num_version
291- #error "prrte API version is less than $ompi_prte_min_version"
292- #endif
293- ] ] ) ] ,
294- [ ompi_setup_prrte_cv_version_happy="yes"] ,
295- [ ompi_setup_prrte_cv_version_happy="no"] ) ] )
296- AS_IF ( [ test "${ompi_setup_prrte_cv_version_happy}" = "no"] ,
297- [ setup_prrte_external_happy="no"] ) ] )
298-
299- CPPFLAGS="$opal_prrte_CPPFLAGS_save"
300-
301- # If an external build and the user told us where to find PRRTE,
302- # find prterun and save that path.
303- prterun_path=
304- AS_IF ( [ test "$setup_prrte_external_happy" = "yes"] ,
305- [ AS_IF ( [ test "${with_prrte_bindir}" = "yes" -o "${with_prrte_bindir}" = "no"] ,
306- [ AC_MSG_ERROR ( [ "yes" and "no" are not valid arguments for --with-prrte-bindir] ) ] )
307- AS_IF ( [ test -z "${with_prrte_bindir}" -a -n "${with_prrte}"] ,
308- [ with_prrte_bindir="${with_prrte}/bin"] )
309- AS_IF ( [ test -n "${with_prrte_bindir}"] ,
310- [ AS_IF ( [ test -x ${with_prrte_bindir}/prterun] ,
311- [ prterun_path="${with_prrte_bindir}/prterun"] ,
312- [ AC_MSG_ERROR ( [ Could not find executable prterun: ${with_prrte_bindir}/prterun] ) ] ) ] ) ] )
313- AS_IF ( [ test -n "${prterun_path}"] ,
314- [ AC_DEFINE_UNQUOTED ( [ OMPI_PRTERUN_PATH] , [ "${prterun_path}"] , [ Path to prterun] ) ] )
315-
316- OMPI_HAVE_PRRTE_RST=0
317- AS_IF ( [ test "$setup_prrte_external_happy" = "yes"] ,
318- [ # Determine if this external PRRTE has installed the RST
319- # directories that we care about
320-
321- AC_MSG_CHECKING ( [ for external PRRTE RST files] )
322- prrte_install_dir=${with_prrte}/share/prte/rst
323- AS_IF ( [ test -n "$SPHINX_BUILD"] ,
324- [ AS_IF ( [ test -d "$prrte_install_dir/prrte-rst-content" && \
325- test -d "$prrte_install_dir/schizo-ompi-rst-content"] ,
326- [ OMPI_HAVE_PRRTE_RST=1
327- OMPI_PRRTE_RST_CONTENT_DIR="$prrte_install_dir/prrte-rst-content"
328- OMPI_SCHIZO_OMPI_RST_CONTENT_DIR="$prrte_install_dir/schizo-ompi-rst-content"
329- AC_MSG_RESULT ( [ found] )
330- ] ,
331- [ # This version of PRRTE doesn't have installed RST
332- # files.
333- AC_MSG_RESULT ( [ not found] )
334- ] )
335- ] )
336- $1 ] ,
337- [ $2 ] )
338-
339- OPAL_VAR_SCOPE_POP
340- ] )
0 commit comments