diff --git a/var/spack/repos/builtin/packages/netcdf/package.py b/var/spack/repos/builtin/packages/netcdf/package.py
index f512ecf2ea2556843e3893a6a0105ba04c483431..ca6a30e9a4d3b5e6045f9d74457978645d0e5b37 100644
--- a/var/spack/repos/builtin/packages/netcdf/package.py
+++ b/var/spack/repos/builtin/packages/netcdf/package.py
@@ -34,7 +34,7 @@ class Netcdf(AutotoolsPackage):
     url      = "http://www.gfd-dennou.org/arch/netcdf/unidata-mirror/netcdf-4.3.3.tar.gz"
 
     # Version 4.4.1.1 is having problems in tests
-    #    https://github.com/Unidata/netcdf-c/issues/343 
+    #    https://github.com/Unidata/netcdf-c/issues/343
     version('4.4.1.1', '503a2d6b6035d116ed53b1d80c811bda')
     # netcdf@4.4.1 can crash on you (in real life and in tests).  See:
     #    https://github.com/Unidata/netcdf-c/issues/282
@@ -137,6 +137,7 @@ def configure_args(self):
 
         if '+mpi' in spec:
             config_args.append('--enable-parallel4')
+            config_args.append('CC=%s' % spec['mpi'].mpicc)
 
         CPPFLAGS.append("-I%s/include" % spec['hdf5'].prefix)
         LDFLAGS.append("-L%s/lib"     % spec['hdf5'].prefix)