version: 4.x
source: http://www.unidata.ucar.edu/downloads/netcdf/
parallel: OK
Netcdf builds as a static library only by default. The configure options below are for a v3-style build needed by GDAL, without fancy extras (HDF, DAP, libcf).
In the netcdf source:
export MACOSX_DEPLOYMENT_TARGET=10.6 ./configure --disable-dependency-tracking --enable-c-only --disable-dap --without-libcf --enable-utilities \ CFLAGS="-Os -arch i386 -arch x86_64 -D_FILE_OFFSET_BITS=64"
After configuration, edit config.h and add at the end:
#undef SIZEOF_LONG #ifdef __LP64__ #define SIZEOF_LONG 8 #else #define SIZEOF_LONG 4 #endif #undef SIZEOF_SIZE_T #ifdef __LP64__ #define SIZEOF_SIZE_T 8 #else #define SIZEOF_SIZE_T 4 #endif
make sudo make install
In the netcdf source:
export MACOSX_DEPLOYMENT_TARGET=10.5 ./configure --disable-dependency-tracking --enable-c-only --disable-dap --without-libcf --enable-utilities \ CFLAGS="-Os -arch ppc -arch i386 -arch ppc64 -arch x86_64 -D_FILE_OFFSET_BITS=64"
After configuration, edit config.h and add at the end:
#undef SIZEOF_LONG #ifdef __LP64__ #define SIZEOF_LONG 8 #else #define SIZEOF_LONG 4 #endif #undef SIZEOF_SIZE_T #ifdef __LP64__ #define SIZEOF_SIZE_T 8 #else #define SIZEOF_SIZE_T 4 #endif
make sudo make install
In the netcdf source:
export MACOSX_DEPLOYMENT_TARGET=10.4 ./configure --disable-dependency-tracking --enable-c-only --disable-dap --without-libcf \\ CFLAGS="-Os -arch ppc -arch i386 -D_FILE_OFFSET_BITS=64 -isysroot /Developer/SDKs/MacOSX10.4u.sdk" make sudo make install