there was an #include directive missing
[openmpi-llc.git] / config / f77_check_type.m4
blob92f569a2ac78c855cf0f20008807bf30f20fe308
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_F77_CHECK_TYPE([type, action if found, action if not found])
21 # -----------------------------------------------------------------
22 AC_DEFUN([OMPI_F77_CHECK_TYPE],[
23     AS_VAR_PUSHDEF([type_var], [ompi_cv_f77_have_$1])
25     # Determine FORTRAN datatype size.
26     # First arg is type, 2nd arg is config var to define
27     AC_CACHE_CHECK([if Fortran 77 compiler supports $1], type_var,
28         [AC_LANG_PUSH([Fortran 77])
29          AC_COMPILE_IFELSE([AC_LANG_SOURCE([[C
30         program main
31         $1 bogus_variable
32         end]])],
33              [AS_VAR_SET(type_var, "yes")],
34              [AS_VAR_SET(type_var, "no")])
35          AC_LANG_POP([Fortran 77])])
37     AS_IF([test "AS_VAR_GET(type_var)" = "yes"], [$2], [$3])
38     AS_VAR_POPDEF([type_var])dnl
39 ])dnl