Skip to content

Commit 4a7f88b

Browse files
Refactored --with-prrte configure option to no longer support external PRRTE builds
Signed-off-by: Alexandria Sisk <[email protected]>
1 parent 72c952d commit 4a7f88b

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

config/ompi_setup_prrte.m4

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,34 @@ OPAL_VAR_SCOPE_PUSH([prrte_setup_internal_happy prrte_setup_external_happy targe
5555
rm -rf "$target_rst_dir/prrte-rst-content"
5656
rm -rf "$target_rst_dir/schizo-ompi-rst-content"
5757
58-
OPAL_3RDPARTY_WITH([prrte], [prrte], [package_prrte], [1])
58+
AC_ARG_WITH([prrte],
59+
[AS_HELP_STRING([--with-prrte],
60+
[Enable/disable building with PRRTE. Supports 'yes' and 'no', defaulting to 'yes'])])
61+
62+
# We only want to accept 'yes' or 'no' as args for --with-prrte.
63+
# If user does not specify, it defaults to 'yes'.
64+
# We no longer support external prrte builds.
65+
AS_IF([test "$with_prrte" != "yes" -a "$with_prrte" != "no" -a "$with_prrte" != ""],
66+
AC_MSG_ERROR(["--with-prrte option defaults to "yes" and supports 'yes' or 'no'. External PRRTE builds are no longer supported.]))
5967
6068
AC_ARG_WITH([prrte-bindir],
6169
[AS_HELP_STRING([--with-prrte-bindir=DIR],
6270
[Search for PRRTE binaries in DIR. Defaults to PRRTE_DIR/bin if not specified])])
63-
64-
prrte_setup_internal_happy=0
71+
72+
# Determines if user wants to build with PRRTE.
73+
# Defaults to building with PRRTE if unspecified.
74+
AS_CASE([$with_prrte],
75+
["yes"], [prrte_setup_internal_happy=1
76+
opal_prrte_mode="internal"],
77+
["no"], [prrte_setup_internal_happy=0
78+
opal_prrte_mode="disable"],
79+
[""], [prrte_setup_internal_happy=1
80+
opal_prrte_mode="internal"]
81+
[opal_prrte_mode="internal"])
82+
6583
m4_ifdef([package_prrte],
6684
[OMPI_PRRTE_ADD_ARGS
67-
AS_IF([test "$opal_prrte_mode" = "unspecified" -o "$opal_prrte_mode" = "internal"],
85+
AS_IF([test "opal_prrte_mode" = "internal"],
6886
[# Run PRRTE's configure script unless the user
6987
# explicitly asked us to use an external PMIX, so that
7088
# "make dist" includes PRRTE in the dist tarball. This
@@ -77,34 +95,16 @@ OPAL_VAR_SCOPE_PUSH([prrte_setup_internal_happy prrte_setup_external_happy targe
7795
_OMPI_SETUP_PRRTE_INTERNAL([prrte_setup_internal_happy=1],
7896
[prrte_setup_internal_happy=0])])
7997
80-
# if we have a pmix package and configure did not complete
81-
# successfully (or wasn't started), then disable make dist.
82-
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"],
98-
[opal_prrte_mode="internal"
99-
OMPI_USING_INTERNAL_PRRTE=1
100-
_OMPI_SETUP_PRRTE_INTERNAL_POST()],
101-
[OMPI_USING_INTERNAL_PRRTE=0])
102-
103-
AS_IF([test "$opal_prrte_mode" != "disabled"],
104-
[AS_IF([test "$prrte_setup_external_happy" = "0" -a "$prrte_setup_internal_happy" = "0"],
105-
[AC_MSG_ERROR([Could not find viable prrte build.])])
106-
OMPI_HAVE_PRRTE=1],
107-
[OMPI_HAVE_PRRTE=0])
98+
# if we have a pmix package and configure did not complete
99+
# successfully (or wasn't started), then disable make dist.
100+
AS_IF([test $prrte_setup_internal_happy != 1],
101+
[OPAL_MAKEDIST_DISABLE="$OPAL_MAKEDIST_DISABLE PRRTE"])])
102+
103+
AS_IF([test "$prrte_setup_internal_happy" = "1"],
104+
[OMPI_HAVE_PRRTE=1
105+
OMPI_USING_INTERNAL_PRRTE=1],
106+
[OMPI_HAVE_PRRTE=0
107+
OMPI_USING_INTERNAL_PRRTE=0])
108108
109109
AM_CONDITIONAL([OMPI_WANT_PRRTE],
110110
[test "$prrte_setup_internal_happy" = "1" -o "$prrte_setup_external_happy" = "1"])

0 commit comments

Comments
 (0)