|
| 1 | +dnl -*- shell-script -*- |
| 2 | +dnl |
| 3 | +dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana |
| 4 | +dnl University Research and Technology |
| 5 | +dnl Corporation. All rights reserved. |
| 6 | +dnl Copyright (c) 2004-2005 The University of Tennessee and The University |
| 7 | +dnl of Tennessee Research Foundation. All rights |
| 8 | +dnl reserved. |
| 9 | +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, |
| 10 | +dnl University of Stuttgart. All rights reserved. |
| 11 | +dnl Copyright (c) 2004-2005 The Regents of the University of California. |
| 12 | +dnl All rights reserved. |
| 13 | +dnl Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved. |
| 14 | +dnl Copyright (c) 2022-2025 Triad National Security, LLC. All rights |
| 15 | +dnl reserved. |
| 16 | +dnl $COPYRIGHT$ |
| 17 | +dnl |
| 18 | +dnl Additional copyrights may follow |
| 19 | +dnl |
| 20 | +dnl $HEADER$ |
| 21 | +dnl |
| 22 | + |
| 23 | +# Check whether or not the Fortran compiler can build mpi_f08 using |
| 24 | +# the given compiler options. This test is intended to |
| 25 | +# trap cases where default INTEGER KIND is equivalent to MPI_COUNT_KIND. |
| 26 | + |
| 27 | +# OMPI_FORTRAN_CHECK_BIG_COUNT([action if found], |
| 28 | +# [action if not found]) |
| 29 | +# ---------------------------------------------------- |
| 30 | +AC_DEFUN([OMPI_FORTRAN_CHECK_BIG_COUNT],[ |
| 31 | + AS_VAR_PUSHDEF([big_count_var], [ompi_cv_big_count_var]) |
| 32 | + |
| 33 | + AC_CACHE_CHECK([if Fortran compiler can compile interface containing MPI_KIND_COUNT arguments ], big_count_var, |
| 34 | + [AC_LANG_PUSH([Fortran]) |
| 35 | + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[module sendit_interfaces |
| 36 | +INTERFACE SendIt |
| 37 | + subroutine SendIt_int(X) |
| 38 | + INTEGER :: X |
| 39 | + end subroutine SendIt_int |
| 40 | + subroutine SendIt_big(x) |
| 41 | + integer(KIND=$OMPI_MPI_COUNT_KIND)::X |
| 42 | + end subroutine SendIt_big |
| 43 | + end interface SendIt |
| 44 | + end module sendit_interfaces]])], |
| 45 | + [AS_VAR_SET(big_count_var, yes)], |
| 46 | + [AS_VAR_SET(big_count_var, no)]) |
| 47 | + touch conftest_foo.mod |
| 48 | + rm -rf *.mod 2>/dev/null |
| 49 | + AC_LANG_POP([Fortran]) |
| 50 | + ]) |
| 51 | + |
| 52 | + AS_VAR_IF(big_count_var, [yes], [$1], [$2]) |
| 53 | + AS_VAR_POPDEF([big_count_var])dnl |
| 54 | +]) |
0 commit comments