testing for fortran 90 modules

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

 



Hello all,

I've been working on a configure.ac 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_LANG([Fortran])
AC_FC_SRCEXT([f90])


AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [use iso_fortran_env],
[write(*,*) 'hello'])],
		   [action-if-true],
		   [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,
-Gabe

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf


[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux