autoconf
[Top][All Lists]
Advanced

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

Re: Fortran 9x support Case and underscoring


From: Philippe Trottier
Subject: Re: Fortran 9x support Case and underscoring
Date: Tue, 5 Aug 2003 11:19:53 +0300

I have been playing with few compilers and tried to test as many F77 / FC macros and see how they
work...

--------------------------
Case handling...
--------------------------
  Absoft: -YEXT_NAMES={ASIS,UPPER,LOWER}
  G77:  -fcase-{upper,lower,preserve}
  ifc: -uppercase -lowercase

In the __AC_FC_NAME_MANGLING it would be easy to add the preserve case in the test
but this might break some compiler ???

subroutine FooBar()
return
end

then add the case:
        FooBar)
            ac_case=preserve
            ac_foo_bar=Foo_Bar

-------------------------
Prefix underscore:
-------------------------
  Absoft: -YEXT_SFX=_ (default= "")
  g77: -funderscoring -fno-underscoring
  ifc: -us -nus (no underscore) (default= _)

--------------------------
The verbose output of ifc if not recognised :
--------------------------
checking how to get verbose linking output from ifc... configure: WARNING: cannot determine how to obtain linking information from ifc

The -v outputs this:
~/Projects/Software/libInversEndian/src/test $ifc -v -c -w95 -Tfjunk.f95 -o test.o
as >ifcP4O4XOgas \
    -version

/opt/intel/compiler70/ia32/bin/f90com  \
    -mGLOB_pack_sort_init_list \
    -noargov \
    -dollarid \
    -convert=native \
    -O1 \
    -auto_scalar \
    -directives \
    -dps \
    -w95 \
    -nopadsrc \
    -q \
    -O9 \
    -I/opt/intel/compiler70/ia32/include \
    -I/opt/intel/compiler70/ia32/include \
    -I/opt/intel/compiler70/ia32/substitute_headers \
    -I/usr/include \
    -mP1OPT_version=700 \
    -mGLOB_source_language=GLOB_SOURCE_LANGUAGE_F90 \
    -mP1OPT_print_version=FALSE \
    -mP3OPT_use_mspp_call_convention \
    -mCG_use_gas_got_workaround=F \
"-mGLOB_options_string=-Xlinker -rpath -Xlinker /opt/intel/compiler70/ia32/lib -I/opt/intel/compiler70/ia32/include -v -c -w95 -Tfjunk.f95 -o test.o" \
    -mGLOB_cxx_limited_range=FALSE \
    -mGLOB_as_output_backup_file_name=/tmp/ifcQXQzK9as_ \
    -mGLOB_machine_model=GLOB_MACHINE_MODEL_IA32_NONE \
    -mP2OPT_subs_out_of_bound=FALSE \
    -mGLOB_opt_level=2 \
    -mIPOPT_obj_output_file_name=test.o \
    -mP3OPT_asm_target=P3OPT_ASM_TARGET_GAS \
    -mGLOB_obj_output_file=test.o \
    -o,test.o+ \
    -mP1OPT_source_file_name=junk.f95 \
    -c,junk.f95+ \
    junk.f95

   external subroutine REFMAKERF95

2 Lines Compiled
rm ifcP4O4XOgas

rm /tmp/ifcQXQzK9as_

rm /tmp/ifcCzE6wuarg

--------------------------
Version options ...
--------------------------

I knew I saw it somewhere in the fortran.m4:355

# Provide some information about the compiler.
echo "$as_me:__oline__:" \
     "checking for _AC_LANG compiler version" >&AS_MESSAGE_LOG_FD
ac_compiler=`set X $ac_compile; echo $[2]`
_AC_EVAL([$ac_compiler --version </dev/null >&AS_MESSAGE_LOG_FD])
_AC_EVAL([$ac_compiler -v </dev/null >&AS_MESSAGE_LOG_FD])
_AC_EVAL([$ac_compiler -V </dev/null >&AS_MESSAGE_LOG_FD])

This is not working with broken compiler like Absoft f77 and f95, they need a dummy source file.

--------------------------
Conclusion
--------------------------

I am already fiddling with the Case and underscore options in the same way autoconf try to find the other options. I was thinking of it like:

AC_FC_CASE(type) type={LOWER,UPPER,PRESERVE}, with a test to know if the requested type is available. AC_FC_SUFFIX(string) string being whatever you try to put after a symbol, the test will tell if it is valid and set the proper options if it is working ?

Other compatibility questions, are all Fortran compiler using CHARACTER like this :
REFMAKERF95(platform,strlen(platform));

Yours,
Philippe






reply via email to

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