Customising CPP flags to match Fortran flags

Mark Hadfield m.hadfield at niwa.co.nz
Tue Mar 27 16:55:47 MDT 2007


For reasons that are probably irrelevant here, a colleague has asked me 
to build netCDF so that the Fortran interface uses a non-standard 
name-mangling convention, namely upper case symbols, no trailing 
underscore. In this way it will be compatible with g95/gfortran/g77 with

  FFLAGS="-fno-underscoring -fcase-upper"

How do I tell configure to do this? I am familiar with using the 
f2cFortran and pgiFortran preprocessor flags to enable/disable the Gnu 
Fortran second-underscore behaviour, but I don't know if there is a 
corresponding flag to give the name-mangling I want. After reading 
cfortran.h I tried AbsoftProFortran. This generates the right names, but 
"make check" fails with an access violation on nf_strerror, presumably 
because of a mismatch in the way strings are passed.

Is there another preprocessor flag that will do what I want? How do I 
roll my own?

-- 
Mark Hadfield          "Ka puwaha te tai nei, Hoea tahi tatou"
m.hadfield at niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)



==============================================================================
To unsubscribe netcdfgroup, visit:
http://www.unidata.ucar.edu/mailing-list-delete-form.html
==============================================================================



More information about the netcdfgroup mailing list