|
1 | 1 | # -*- shell-script -*-
|
2 | 2 | #
|
3 | 3 | # Copyright (c) 2020 Intel, Inc. All rights reserved.
|
4 |
| -# Copyright (c) 2020 Cisco Systems, Inc. All rights reserved |
| 4 | +# Copyright (c) 2020-2021 Cisco Systems, Inc. All rights reserved. |
5 | 5 | # $COPYRIGHT$
|
6 | 6 | #
|
7 | 7 | # Additional copyrights may follow
|
|
10 | 10 | #
|
11 | 11 |
|
12 | 12 | AC_DEFUN([OMPI_CHECK_DELETED_OPTIONS],[
|
13 |
| - OPAL_VAR_SCOPE_PUSH([with_pmi_given with_pmi_libdir_given cxx]) |
| 13 | + OPAL_VAR_SCOPE_PUSH([with_pmi_given with_pmi_libdir_given ompi_cxx_warn ompi_cxx_error]) |
14 | 14 |
|
15 | 15 | # --with-pmi options were removed in v5.0
|
16 | 16 | AC_ARG_WITH([pmi],
|
@@ -41,38 +41,55 @@ AC_DEFUN([OMPI_CHECK_DELETED_OPTIONS],[
|
41 | 41 | AC_MSG_ERROR([Build cannot continue.])
|
42 | 42 | fi
|
43 | 43 |
|
44 |
| - # Open MPI C++ bindings were removed in v5.0 |
45 |
| - cxx=0 |
46 |
| - cxxseek=0 |
47 |
| - cxxex=0 |
| 44 | + # Note that we always *warn* if someone used a CLI option for a |
| 45 | + # feature that has been deleted. If, however, they are disabling |
| 46 | + # the deleted feature (e.g., --disable-mpi-cxx), then emitting a |
| 47 | + # warning is good enough -- allow configure to continue. If, |
| 48 | + # however, the user asked to enable a deleted feature, then |
| 49 | + # configure needs to error out. |
| 50 | + ompi_cxx_warn=0 |
| 51 | + ompi_cxx_error=0 |
48 | 52 | AC_ARG_ENABLE([mpi-cxx],
|
49 | 53 | [AS_HELP_STRING([--enable-mpi-cxx],
|
50 | 54 | [*DELETED* Build the MPI C++ bindings])],
|
51 |
| - [cxx=1]) |
| 55 | + [ompi_cxx_warn=1 |
| 56 | + AS_IF([test "$enable_mpi_cxx" != "no"], |
| 57 | + [ompi_cxx_error=1]) |
| 58 | + ]) |
52 | 59 | AC_ARG_ENABLE([mpi-cxx-seek],
|
53 | 60 | [AS_HELP_STRING([--enable-mpi-cxx-seek],
|
54 | 61 | [*DELETED* Build support for MPI::SEEK])],
|
55 |
| - [cxxseek=1]) |
| 62 | + [ompi_cxx_warn=1 |
| 63 | + AS_IF([test "$enable_mpi_cxx_seek" != "no"], |
| 64 | + [ompi_cxx_error=1]) |
| 65 | + ]) |
56 | 66 | AC_ARG_ENABLE([cxx-exceptions],
|
57 | 67 | [AS_HELP_STRING([--enable-cxx-exceptions],
|
58 | 68 | [*DELETED* Build support for C++ exceptions in the MPI C++ bindings])],
|
59 |
| - [cxxex=1]) |
| 69 | + [ompi_cxx_warn=1 |
| 70 | + AS_IF([test "$enable_cxx_exceptions" != "no"], |
| 71 | + [ompi_cxx_error=1]) |
| 72 | + ]) |
60 | 73 |
|
61 |
| - AS_IF([test "$enable_mpi_cxx" = "no" ], |
62 |
| - [cxx=0]) |
63 |
| - |
64 |
| - AS_IF([test "$enable_mpi_cxx_seek" = "no" ], |
65 |
| - [cxxseek=0]) |
66 |
| - |
67 |
| - AS_IF([test "$enable_cxx_exceptions" = "no" ], |
68 |
| - [cxxex=0]) |
69 |
| - |
70 |
| - AS_IF([test $cxx -eq 1 || test $cxxseek -eq 1 || test $cxxex -eq 1], |
71 |
| - [AC_MSG_WARN([The MPI C++ bindings have been removed from Open MPI.]) |
| 74 | + AS_IF([test $ompi_cxx_warn -eq 1], |
| 75 | + [AC_MSG_WARN([An MPI C++ bindings-related command line option]) |
| 76 | + AC_MSG_WARN([was given to "configure".]) |
| 77 | + AC_MSG_WARN([ ]) |
| 78 | + AC_MSG_WARN([This command line option will be removed in a future]) |
| 79 | + AC_MSG_WARN([version of Open MPI; you should discontinue using it.]) |
| 80 | + AC_MSG_WARN([You have been warned!]) |
| 81 | + AC_MSG_WARN([ ]) |
| 82 | + AC_MSG_WARN([The MPI C++ bindings were deprecated in the MPI-2.2]) |
| 83 | + AC_MSG_WARN([standard in 2009, and removed from the MPI-3.0]) |
| 84 | + AC_MSG_WARN([standard in 2012. The MPI C++ bindings were then]) |
| 85 | + AC_MSG_WARN([removed from Open MPI v5.0.0 in 2022.]) |
| 86 | + AC_MSG_WARN([ ]) |
72 | 87 | AC_MSG_WARN([If you need support for the MPI C++ bindings, you])
|
73 | 88 | AC_MSG_WARN([will need to use an older version of Open MPI.])
|
74 |
| - AC_MSG_ERROR([Build cannot continue.]) |
75 | 89 | ])
|
76 | 90 |
|
| 91 | + AS_IF([test $ompi_cxx_error -eq 1], |
| 92 | + [AC_MSG_ERROR([Build cannot continue.])]) |
| 93 | + |
77 | 94 | OPAL_VAR_SCOPE_POP
|
78 | 95 | ])
|
0 commit comments