|
171 | 171 | #include "ompi/mpi/fortran/configure-fortran-output.h"
|
172 | 172 |
|
173 | 173 | module mpi_ext
|
| 174 | +! Some mpi_ext extensions may require the mpi module. |
| 175 | + use mpi |
| 176 | +! |
174 | 177 | ! Even though this is not a useful parameter (cannot be used as a
|
175 | 178 | ! preprocessor catch) define it to keep the linker from complaining
|
176 | 179 | ! during the build.
|
|
213 | 216 | #include "ompi/mpi/fortran/configure-fortran-output.h"
|
214 | 217 |
|
215 | 218 | module mpi_f08_ext
|
| 219 | +! Some mpi_f08_ext extensions may require the mpi_f08 module. |
| 220 | + use mpi_f08 |
| 221 | +! |
216 | 222 | ! Even though this is not a useful parameter (cannot be used as a
|
217 | 223 | ! preprocessor catch) define it to keep the linker from complaining
|
218 | 224 | ! during the build.
|
|
601 | 607 | #
|
602 | 608 | # Include the mpif.h header if it is available. Cannot do
|
603 | 609 | # this from inside the usempi.h since, for VPATH builds, the
|
604 |
| - # srcdir is needed to find the header. |
| 610 | + # srcdir is needed to find the header. Each extension can |
| 611 | + # refuse it by defining the OMPI_MPIEXT_$1_INCLUDE_MPIFH_IN_USEMPI |
| 612 | + # macro in its ompi/mpiext/*/configure.m4. See |
| 613 | + # ompi/mpiext/example/configure.m4 for an example. |
605 | 614 | #
|
606 |
| - if test "$enabled_mpifh" = 1; then |
| 615 | + m4_ifdef([OMPI_MPIEXT_]$1[_INCLUDE_MPIFH_IN_USEMPI], |
| 616 | + [include_mpifh=OMPI_MPIEXT_$1_INCLUDE_MPIFH_IN_USEMPI], |
| 617 | + [include_mpifh=1]) |
| 618 | + if test "$enabled_mpifh" = 1 && test "$include_mpifh" != 0; then |
607 | 619 | mpifh_component_header="mpiext_${component}_mpifh.h"
|
608 | 620 | cat >> $mpiusempi_ext_h <<EOF
|
609 | 621 | #include "${mpifh_component_header_path}"
|
|
657 | 669 | #
|
658 | 670 | # Include the mpif.h header if it is available. Cannot do
|
659 | 671 | # this from inside the usempif08.h since, for VPATH builds,
|
660 |
| - # the srcdir is needed to find the header. |
| 672 | + # the srcdir is needed to find the header. Each extension can |
| 673 | + # refuse it by defining the OMPI_MPIEXT_$1_INCLUDE_MPIFH_IN_USEMPIF08 |
| 674 | + # macro in its ompi/mpiext/*/configure.m4. See |
| 675 | + # ompi/mpiext/example/configure.m4 for an example. |
661 | 676 | #
|
662 |
| - if test "$enabled_mpifh" = 1; then |
| 677 | + m4_ifdef([OMPI_MPIEXT_]$1[_INCLUDE_MPIFH_IN_USEMPIF08], |
| 678 | + [include_mpifh=OMPI_MPIEXT_$1_INCLUDE_MPIFH_IN_USEMPIF08], |
| 679 | + [include_mpifh=1]) |
| 680 | + if test "$enabled_mpifh" = 1 && test "$include_mpifh" != 0; then |
663 | 681 | mpifh_component_header="mpiext_${component}_mpifh.h"
|
664 | 682 | cat >> $mpiusempif08_ext_h <<EOF
|
665 | 683 | #include "${mpifh_component_header_path}"
|
|
0 commit comments