1include(head.m4) 2define(atype_code,regexp(file,`_\([ircl][0-9]+\).[fF]90',`\1'))dnl 3define(atype_letter,substr(atype_code, 0, 1))dnl 4define(atype_kind,substr(atype_code, 1))dnl 5define(get_typename2, `$1 (kind=$2)')dnl 6define(get_typename, `get_typename2(ifelse($1,i,integer,ifelse($1,r,real,ifelse($1,l,logical,ifelse($1,c,complex,unknown)))),`$2')')dnl 7define(atype_name, get_typename(atype_letter,atype_kind))dnl 8define(name, regexp(regexp(file, `[^/]*$', `\&'), `^_\([^_]*\)_', `\1'))dnl 9define(function_name,`_gfortran_specific__'name`_'atype_code)dnl 10 11define(Q,ifelse(atype_kind,4,F,ifelse(atype_kind,8,`',ifelse(atype_kind,10,L,ifelse(atype_kind,16,L,`_'atype_kind)))))dnl 12 13#include "config.h" 14#include "kinds.inc" 15#include "c99_protos.inc" 16 17`#if defined (HAVE_GFC_'ifelse(atype_letter,l,LOGICAL,ifelse(atype_letter,i,INTEGER,ifelse(atype_letter,r,REAL,ifelse(atype_letter,c,COMPLEX,UNKNOW))))`_'atype_kind`)' 18 19ifelse(name,atan2,`#ifdef HAVE_ATAN2'Q,) 20 21elemental function function_name (p1, p2) 22 atype_name, intent (in) :: p1, p2 23 atype_name :: function_name 24 25 function_name = name (p1, p2) 26end function 27 28ifelse(name,atan2,`#endif',) 29 30#endif 31