def METHOD_NAME(self):
    """Configure SLEPc by setting configure options and running configure script."""
    # check PETSc dependency
    if not get_software_root("PETSc"):
        raise EasyBuildError("PETSc module not loaded?")
    # set SLEPC_DIR environment variable
    env.setvar('SLEPC_DIR', self.cfg['start_dir'])
    self.log.debug('SLEPC_DIR: %s' % os.getenv('SLEPC_DIR'))
    # optional dependencies
    dep_filter = [d['name'] for d in self.cfg.builddependencies()] + ['PETSc', 'Python']
    deps = [dep['name'] for dep in self.cfg.dependencies() if dep['name'] not in dep_filter]
    for dep in deps:
        deproot = get_software_root(dep)
        if deproot:
            withdep = "--with-%s" % dep.lower()
            self.cfg.update('configopts', '%s=1 %s-dir=%s' % (withdep, withdep, deproot))
    if self.cfg['sourceinstall']:
        # run configure without --prefix (required)
        cmd = "%s ./configure %s" % (self.cfg['preconfigopts'], self.cfg['configopts'])
        (out, _) = run_cmd(cmd, log_all=True, simple=False)
    else:
        # regular './configure --prefix=X' for non-source install
        # make sure old install dir is removed first
        self.make_installdir(dontcreate=True)
        out = super(EB_SLEPc, self).METHOD_NAME()
    # check for errors in configure
    error_regexp = re.compile("ERROR")
    if error_regexp.search(out):
        raise EasyBuildError("Error(s) detected in configure output!")
    # define $PETSC_ARCH
    petsc_arch = self.cfg['petsc_arch']
    if self.cfg['petsc_arch'] is None:
        petsc_arch = 'arch-installed-petsc'
    env.setvar('PETSC_ARCH', petsc_arch)
    if self.cfg['sourceinstall']:
        self.slepc_subdir = os.path.join('%s-%s' % (self.name.lower(), self.version), petsc_arch)
    # SLEPc > 3.5, make does not accept -j
    if LooseVersion(self.version) >= LooseVersion("3.5"):
        self.cfg['parallel'] = None