File: ompi_fortran_check_preprocess_f90.m4

package info (click to toggle)
openmpi 5.0.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 202,312 kB
  • sloc: ansic: 612,441; makefile: 42,495; sh: 11,230; javascript: 9,244; f90: 7,052; java: 6,404; perl: 5,154; python: 1,856; lex: 740; fortran: 61; cpp: 20; tcl: 12
file content (43 lines) | stat: -rw-r--r-- 1,919 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
dnl -*- shell-script -*-
dnl
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
dnl                         University Research and Technology
dnl                         Corporation.  All rights reserved.
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
dnl                         of Tennessee Research Foundation.  All rights
dnl                         reserved.
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
dnl                         University of Stuttgart.  All rights reserved.
dnl Copyright (c) 2004-2005 The Regents of the University of California.
dnl                         All rights reserved.
dnl Copyright (c) 2009      Oak Ridge National Labs.  All rights reserved.
dnl Copyright (c) 2009-2020 Cisco Systems, Inc.  All rights reserved.
dnl Copyright (c) 2015      Research Organization for Information Science
dnl                         and Technology (RIST). All rights reserved.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
dnl
dnl $HEADER$
dnl

AC_DEFUN([OMPI_FORTRAN_CHECK_PREPROCESS_F90], [
    AC_MSG_CHECKING([if Fortran compilers preprocess .F90 files without additional flag])
    cat > conftest_f.F90 << EOF
#if 0
#error The source file was not preprocessed
#endif
      program bogus
      end program
EOF
    OPAL_LOG_COMMAND([$FC $FCFLAGS -c conftest_f.F90],
                     [AC_MSG_RESULT([yes])],
                     [AC_MSG_RESULT([no])
                      AC_MSG_CHECKING([if -fpp flag works])
                      OPAL_LOG_COMMAND([$FC $FCFLAGS -fpp -c conftest_f.F90],
                                       [AC_MSG_RESULT([yes])
                                        FCFLAGS="$FCFLAGS -fpp"],
                                       [AC_MSG_RESULT(no)
                                        AC_MSG_ERROR([cannot preprocess Fortran files, Aborting])])])
    rm -f conftest*
])dnl