I checked release 4.0.0 and I had problem compiling with netcdf.
In 'config.h.in' I had to change HAVE_NETCDF_H to HAVE_NETCDF4_H to get rid of multiple link issues. I used the NETCDF 4.0.1 latest stable release.
As well, I had to add --disable-ncoxx --disable-ncap2. It seemed that --disable-ncoxx was not enough and NCOXX was being defined.
I got it compiled and I am working using your chunking policy. Everything is good at this time. Thanks!