Dear FreeSurfer Experts,

I was trying to compile the FreeSurfer code by following steps shown in https://surfer.nmr.mgh.harvard.edu/fswiki/freesurfer_mac_developers_page 

However, I got this error message after I ran ./configure
 

configure: error: FATAL: netcdf lib not found. Set LDFLAGS or --with-mni-dir.



I currently use  OS X El Capitan as the OS.

How can I solve this problem? Thank you in advance.

Aziz.