Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Re: Customising CPP flags to match Fortran flags

Mark Hadfield <m.hadfield@xxxxxxxxxx> writes:

> 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@xxxxxxxxxx
> National Institute for Water and Atmospheric Research (NIWA)

If you set FFLAGS, FCFLAGS, and F90FLAGS to the flags you want, before
running the netCDF configure, that should work. Doesn't it?

Make sure you do a make distclean first when changing the flags!

Thanks,

Ed

-- 
Ed Hartnett  -- ed@xxxxxxxxxxxxxxxx

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


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690