[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

testing for fortran 90 modules

From: Gabriel Altay
Subject: testing for fortran 90 modules
Date: Sun, 17 Jun 2012 15:03:23 +0100

Hello all,

I've been working on a file that will tell me if specific
features in the Fortran 90/03/08 standard are available.  One of the
simplest extensions is an intrinsic module called iso_fortran_env
which can be included in a fortran program with the use statement.
The test code would look like this,

program test
use iso_fortran_env
write(*,*) 'hello'
end program

I'm new to autoconf but I've worked out that I want to use something like,


AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [use iso_fortran_env],
[write(*,*) 'hello'])],
                   [AC_MSG_FAILURE(im an error message)] )

What I'm trying to figure out is

1) can I have multiple lines in the program using AC_LANG_PROGRAM or
am I restricted to one line statements?  I know in C one can use ";"
to indicate a new line, but I'm not sure there is a similar character
in Fortran 90

2) I've seen that there is a separate AC_??? command to include C .h
header files in the program.  Is there something similar to include
module .mod files in a  Fortran program?  or is there a way to somehow
use the prologue argument of the AC_LANG_PROGRAM() command?

Basically, I know the program I'd need to write to test for the
features I want to test for I just don't know how to tell autoconf
about those programs.  Any help appreciated. Thanks,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]