Larry Baker <baker@xxxxxxxx> writes:
> John,
>
> I have no experience with the version of the library you are trying to
> compile, nor with Snow Leopard yet. However, my ./configure command
> is slightly different than yours, esp. note -DgFortran:
>
> ./configure >configure.log 2>&1 \
> CC="gcc -m64" \
> CFLAGS="-g -O2" \
> CXX="g++ -m64" \
> CXXFLAGS="-g -O2" \
> CPPFLAGS="-DNDEBUG -DgFortran" \
> FC="gfortran -m64" \
> FCFLAGS="-g -O2"
>
> Larry Baker
> US Geological Survey
> 650-329-5608
> baker@xxxxxxxx
>
>>
>> #!/bin/bash
>> make distclean
>> #
>> export FCFLAGS='-m64'
>> export CC=/usr/bin/cc
>> export F77=gfortran
>> export FC=gfortran
>> export FCFLAGS=-qsuffix=cpp=f90
>> export CPPFLAGS='-Df2cFortran'
>> #
>> ./configure --prefix=/usr/local/netcdf-4.1.2-beta1 --enable-f90 --
>> with-curl=/usr/local/lib
>>
>> Assistance would be very helpful since I don't have a working copy
>> of GMT on this machine at the moment and need one.
>>
It's a little confusing, but there are *two* sets of Fortran flags, one
for F77 (FFLAGS) and one for F90+ (FCFLAGS). If you are going to build
64 bit, with GNU compilers, you must use -m64 for BOTH F77 and
F90. Furthermore, you also need to use the same flag for C (and C++ if
you build that).
So a better set of environment vars for your flags would be:
CFLAGS=-m64
FFLAGS=-m64
FCFLAGS=-m64
CXXFLAGS=-m64
Setting CPPFLAGS is tricky, as it depends on your version of
gfortan. It should either be set to -Df2cFortran or (more likely)
-DgFortran. One way to handle this is to try setting neither, and see if
the netcdf configure script can figure it out.
I hope this answers all the questions!
Thanks,
Ed
--
Ed Hartnett -- ed@xxxxxxxxxxxxxxxx