diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 6591f04bae5..2f4a285cb21 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -1084,10 +1084,16 @@ def configure_args(self): config_args.extend(["--enable-debug"]) # Package dependencies - for dep in ["libevent", "lustre", "singularity", "valgrind"]: + for dep in ["lustre", "singularity", "valgrind"]: if "^" + dep in spec: config_args.append("--with-{0}={1}".format(dep, spec[dep].prefix)) + # libevent support + if spec.satisfies("+internal-libevent"): + config_args.append("--with-libevent=internal") + elif "^libevent" in spec: + config_args.append("--with-libevent={0}".format(spec["libevent"].prefix)) + # PMIx support if spec.satisfies("+internal-pmix"): config_args.append("--with-pmix=internal")