Next Up Previous Contents
Next: A.3 AC_FC_HAVE_BOZ
Up: A The Starconf macros and variables
Previous: A.1 AC_FC_CHECK_HEADERS
[ID index][Keyword index]

A.2 AC_FC_CHECK_INTRINSICS

AC_FC_CHECK_INTRINSICS (function...)

Like AC_CHECK_FUNCS, but instead determine the intrinsics available to the Fortran compiler. For each intrinsic in the (whitespace-separated and case-insensitive) argument list, define HAVE_INTRINSIC_intrinsic if it is available. For example, AC_FC_CHECK_INTRINSICS(sin) would define HAVE_INTRINSIC_SIN if the `sin' intrinsic function were available (there are probably rather few Fortrans which don't have this function).

There are some functions, such as getcwd, getenv and chdir, which are provided as intrinsics by some Fortran compilers, but which others supply as external routines in the Fortran runtime. To deal with this (exasperating) situation, you need a construction like this in your configure.ac:


AC_FC_CHECK_INTRINSICS([getcwd])
AC_LANG_PUSH([Fortran])
AC_CHECK_FUNCS([getcwd])
AC_LANG_POP([Fortran])
and then conditionalise on the defines HAVE_GETCWD and HAVE_INTRINSIC_GETCWD in your preprocessable code. That is, you use the standard macro AC_CHECK_FUNCS, but wrapped in declarations which force the check to use Fortran (this doesn't work in standard autoconf, since the required support is missing).


Next Up Previous Contents
Next: A.3 AC_FC_HAVE_BOZ
Up: A The Starconf macros and variables
Previous: A.1 AC_FC_CHECK_HEADERS
[ID index][Keyword index]
The Starlink Build System
Starlink System Note 78
Norman Gray, Peter W Draper, Mark B Taylor, Steven E Rankin
11 April 2005. Release snapshot: $Revision: 1.116 $. Last updated 28 May 2006