there was an #include directive missing
[openmpi-llc.git] / config / f90_check_type.m4
blobe680631f0a4f982140ba852cf5fe5abc62ab8ef9
1 dnl -*- shell-script -*-
2 dnl
3 dnl Copyright (c) 2004-2006 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$
14 dnl 
15 dnl Additional copyrights may follow
16 dnl 
17 dnl $HEADER$
18 dnl
20 # OMPI_F90_CHECK_TYPE([type, action if found, action if not found])
21 # -----------------------------------------------------------------
22 AC_DEFUN([OMPI_F90_CHECK_TYPE],[
23     AS_VAR_PUSHDEF([type_var], [ompi_cv_f90_have_$1])
25     # Determine FORTRAN datatype size.
26     # First arg is type, 2nd arg is config var to define
28     AC_CACHE_CHECK([if Fortran 90 compiler supports $1], type_var,
29         [AC_LANG_PUSH([Fortran])
30          AC_COMPILE_IFELSE([AC_LANG_SOURCE([[program main
31     $1 :: x
32 end]])],
33              [AS_VAR_SET(type_var, "yes")],
34              [AS_VAR_SET(type_var, "no")])
35          AC_LANG_POP([Fortran])])
37     AS_IF([test "AS_VAR_GET(type_var)" = "yes"], [$2], [$3])
38     AS_VAR_POPDEF([type_var])dnl
39 ])dnl