Hi Arash,
For the linux version, you need to have netcdf build and installed (./configure & make & make install, see the netcdf manual and readme files for that). You can also install using apt-get or yum on most systems. Don't forget to check if it's at least version 4.1 and don't forget to install the header files (netcdf-dev/netcdf-devel).
NetCDF uses the pkg-config system to inform other programs on how they should link against netcdf.
Building and installing netcdf should result in a netcdf.pc file. This file is usually (if you build it yourself) in /usr/local/lib/pkgconfig/netcdf.pc. This /usr/local/lib/pkgconfig should be in your PKG_CONFIG_PATH, so you can type:
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
I think it can alternatively find the settings using the nc-config program, which is also automatically build and installed if you install netcdf. This could be in your /usr/local/bin, which should be in your PATH. If it isn't you can type:
export PATH=$PATH:/usr/local/bin
If you don't want to, or cannot install executables in /usr/local (the default on linux), you can configure netcdf with a prefix:
./configure --enable-shared --enable-fortran --prefix=/home/aei15/local & make & make install
HTH,
Fedor