autoconf
[Top][All Lists]
Advanced

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

Macro to obtain kind parameter value in F90?


From: Rhys Ulerich
Subject: Macro to obtain kind parameter value in F90?
Date: Tue, 12 Oct 2010 10:11:24 -0500

Can anyone recommend a macro for obtaining a kind parameter value in
Fortran 90?  Or a macro where I might look for how to roll my own?

The check would be like AC_SIZEOF, but instead of returning the size
it would return the kind parameter value (an integer).  AC_COMPUTE_INT
would be perfect, but it appears to not work inside
AC_LANG_PUSH([Fortran])/AC_LANG_POP([Fortran]) due to an error like
'AC_LANG_BOOL_COMPILE_TRY: unknown language: Fortran'.

For the curious, I want the value so that I can wrap a C
implementation with a public Fortran API that exposes types like
REAL(4) instead of REAL(C_FLOAT).  The latter "leaks" ISO_C_BINDING
information to clients while the former does not.

- Rhys



reply via email to

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