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!



Ed Hartnett  -- ed@xxxxxxxxxxxxxxxx

To unsubscribe netcdfgroup, visit: