@@ -387,6 +387,21 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[
387
387
[OMPI_TRY_FORTRAN_BINDINGS= $OMPI_FORTRAN_MPIFH_BINDINGS
388
388
AC_MSG_RESULT([no])])
389
389
390
+ OMPI_FORTRAN_HAVE_BIND_C_TYPE= 0
391
+ OMPI_FORTRAN_HAVE_TYPE_MPI_STATUS= 0
392
+
393
+ AS_IF([test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPI_BINDINGS ],
394
+ [OMPI_FORTRAN_CHECK_BIND_C_TYPE(
395
+ [OMPI_FORTRAN_HAVE_BIND_C_TYPE= 1
396
+ OMPI_FORTRAN_HAVE_TYPE_MPI_STATUS= 1])])
397
+
398
+ AC_SUBST(OMPI_FORTRAN_HAVE_TYPE_MPI_STATUS)
399
+ AM_CONDITIONAL(OMPI_FORTRAN_HAVE_TYPE_MPI_STATUS,
400
+ [test $OMPI_FORTRAN_HAVE_TYPE_MPI_STATUS -eq 1])
401
+ # AC_DEFINE_UNQUOTED(OMPI_FORTRAN_HAVE_TYPE_MPI_STATUS,
402
+ # [$OMPI_FORTRAN_HAVE_TYPE_MPI_STATUS],
403
+ # [For configure-fortran-output.h: Whether the compiler supports TYPE(MPI_Status) or not])
404
+
390
405
# ---------------------------------
391
406
# Fortran use mpi_f08 MPI bindings
392
407
# ---------------------------------
@@ -422,14 +437,11 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[
422
437
[OMPI_FORTRAN_HAVE_BIND_C_SUB= 0
423
438
OMPI_BUILD_FORTRAN_BINDINGS= $OMPI_FORTRAN_USEMPI_BINDINGS ])])
424
439
425
- OMPI_FORTRAN_HAVE_BIND_C_TYPE= 0
426
440
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \
427
441
test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS ],
428
442
[ # If we don't have TYPE, BIND(C), we won't build mpi_f08 at all
429
- OMPI_FORTRAN_CHECK_BIND_C_TYPE(
430
- [OMPI_FORTRAN_HAVE_BIND_C_TYPE= 1],
431
- [OMPI_FORTRAN_HAVE_BIND_C_TYPE= 0
432
- OMPI_BUILD_FORTRAN_BINDINGS= $OMPI_FORTRAN_USEMPI_BINDINGS ])])
443
+ AS_IF([test $OMPI_FORTRAN_HAVE_BIND_C_TYPE -ne 1],
444
+ [OMPI_BUILD_FORTRAN_BINDINGS= $OMPI_FORTRAN_USEMPI_BINDINGS ])])
433
445
434
446
# Per discussion on the devel list starting here:
435
447
# https://www.open-mpi.org/community/lists/devel/2014/01/13799.php
@@ -701,6 +713,16 @@ end type test_mpi_handle],
701
713
AM_CONDITIONAL(OMPI_BUILD_FORTRAN_USEMPI_IGNORE_TKR_BINDINGS,
702
714
[test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPI_BINDINGS && \
703
715
test $OMPI_FORTRAN_HAVE_IGNORE_TKR -eq 1])
716
+ # True if we support TYPE, BIND(C)
717
+ AC_DEFINE_UNQUOTED(OMPI_FORTRAN_HAVE_BIND_C_TYPE,
718
+ [$OMPI_FORTRAN_HAVE_BIND_C_TYPE ],
719
+ [For ompi_info: Whether the compiler supports TYPE, BIND(C) or not])
720
+
721
+ # For mpif-status.h, configure-fortran-output.h, mpi-f08-types.F90 (and ompi_info)
722
+ AC_SUBST([OMPI_FORTRAN_HAVE_PRIVATE])
723
+ AC_DEFINE_UNQUOTED([OMPI_FORTRAN_HAVE_PRIVATE],
724
+ [$OMPI_FORTRAN_HAVE_PRIVATE ],
725
+ [For mpif-status.h, mpi-f08-types.f90 and ompi_info: whether the compiler supports the " private" keyword or not (used in TYPE(MPI_Status))])
704
726
705
727
# -------------------
706
728
# use mpi_f08 final setup
@@ -749,22 +771,13 @@ end type test_mpi_handle],
749
771
AC_DEFINE_UNQUOTED(OMPI_FORTRAN_HAVE_BIND_C_SUB,
750
772
[$OMPI_FORTRAN_HAVE_BIND_C_SUB ],
751
773
[For ompi_info: Whether the compiler supports SUBROUTINE ... BIND(C) or not])
752
- AC_DEFINE_UNQUOTED(OMPI_FORTRAN_HAVE_BIND_C_TYPE,
753
- [$OMPI_FORTRAN_HAVE_BIND_C_TYPE ],
754
- [For ompi_info: Whether the compiler supports TYPE, BIND(C) or not])
755
774
AC_DEFINE_UNQUOTED(OMPI_FORTRAN_HAVE_BIND_C_TYPE_NAME,
756
775
[$OMPI_FORTRAN_HAVE_BIND_C_TYPE_NAME ],
757
776
[For ompi_info: Whether the compiler supports TYPE, BIND(C, NAME=" name" ) or not])
758
777
AC_DEFINE_UNQUOTED([OMPI_FORTRAN_HAVE_OPTIONAL_ARGS],
759
778
[$OMPI_FORTRAN_HAVE_OPTIONAL_ARGS ],
760
779
[For ompi_info: whether the Fortran compiler supports optional arguments or not])
761
780
762
- # For configure-fortran-output.h, mpi-f08-types.F90 (and ompi_info)
763
- AC_SUBST([OMPI_FORTRAN_HAVE_PRIVATE])
764
- AC_DEFINE_UNQUOTED([OMPI_FORTRAN_HAVE_PRIVATE],
765
- [$OMPI_FORTRAN_HAVE_PRIVATE ],
766
- [For mpi-f08-types.f90 and ompi_info: whether the compiler supports the " private" keyword or not (used in MPI_Status)])
767
-
768
781
# For configure-fortran-output.h, mpi-f08-interfaces-callbacks.F90
769
782
# (and ompi_info)
770
783
AC_SUBST([OMPI_FORTRAN_HAVE_ABSTRACT])
0 commit comments