nc-config is a simple script that reports the configuration flags used during the netCDF build, as well as the installed version of the netCDF C-based libraries. It has lots of options, listed by invoking "nc-config --all".
Here's an example of output from:
nc-config --alloutput
Here's an example of how to compile and link a C application and a Fortran application, using nc-config:
cc myapp.c -o myapp `nc-config --cflags --libs`
f95 yourapp.f -o yourapp `nc-config --fflags --flibs`
You can use the "nf-config" utility instead of "nc-config" for Fortran applications.