[netcdfgroup] Two installations of netcdf

I want to keep two different installations of Netcdf on the same system
compiled with different compilers, e.g one with ifort and other with
gfortran. How can I keep the two libraries seperate.
Thanks