2005-08-26 Uros Bizjak <uros@kss-loka.si>
[official-gcc.git] / libgfortran / m4 / specific.m4
bloba6cea730a79c36c9ad07b32fe7154f377eab70a8
1 include(head.m4)
2 define(atype_code,regexp(file,`_\([ircl][0-9]+\).f90',`\1'))dnl
3 define(atype_letter,substr(atype_code, 0, 1))dnl
4 define(atype_kind,substr(atype_code, 1))dnl
5 define(get_typename2, `$1 (kind=$2)')dnl
6 define(get_typename, `get_typename2(ifelse($1,i,integer,ifelse($1,r,real,ifelse($1,l,logical,ifelse($1,c,complex,unknown)))),`$2')')dnl
7 define(atype_name, get_typename(atype_letter,atype_kind))dnl
8 define(name, regexp(regexp(file, `[^/]*$', `\&'), `^_\([^_]*\)_', `\1'))dnl
9 define(function_name,`specific__'name`_'atype_code)dnl
11 elemental function function_name (parm)
12    atype_name, intent (in) :: parm
13    atype_name :: function_name
15    function_name = name (parm)
16 end function