def METHOD_NAME(self):
    spec = self.spec
    config_args = [
        "--with-otf2=%s" % spec["otf2"].prefix.bin,
        "--with-opari2=%s" % spec["opari2"].prefix.bin,
        "--enable-shared",
    ]
    cname = spec.compiler.name
    if not spec.satisfies("platform=cray"):
        config_args.append("--with-nocross-compiler-suite={0}".format(cname))
    if self.version >= Version("4.0"):
        config_args.append("--with-cubew=%s" % spec["cubew"].prefix.bin)
        config_args.append("--with-cubelib=%s" % spec["cubelib"].prefix.bin)
    else:
        config_args.append("--with-cube=%s" % spec["cube"].prefix.bin)
    if "+papi" in spec:
        config_args.append("--with-papi-header=%s" % spec["papi"].prefix.include)
        config_args.append("--with-papi-lib=%s" % spec["papi"].prefix.lib)
    if "+pdt" in spec:
        config_args.append("--with-pdt=%s" % spec["pdt"].prefix.bin)
    if "+unwind" in spec:
        config_args.append("--with-libunwind=%s" % spec["libunwind"].prefix)
    if "+cuda" in spec:
        config_args.append("--with-libcuda=%s" % spec["cuda"].prefix)
    if "+hip" in spec:
        config_args.append("--with-rocm=%s" % spec["hip"].prefix)
    config_args += self.with_or_without("shmem")
    if not spec.satisfies("platform=cray"):
        config_args += self.with_or_without("mpi")
    if spec.satisfies("^intel-mpi"):
        config_args.append("--with-mpi=intel3")
    elif (
        spec.satisfies("^mpich")
        or spec.satisfies("^mvapich2")
        or spec.satisfies("^cray-mpich")
    ):
        config_args.append("--with-mpi=mpich3")
    elif spec.satisfies("^openmpi"):
        config_args.append("--with-mpi=openmpi")
    if spec.satisfies("^binutils"):
        config_args.append("--with-libbfd=%s" % spec["binutils"].prefix)
    config_args.extend(
        [
            "CFLAGS={0}".format(self.compiler.cc_pic_flag),
            "CXXFLAGS={0}".format(self.compiler.cxx_pic_flag),
        ]
    )
    if "+mpi" in spec:
        config_args.extend(
            [
                "MPICC={0}".format(spec["mpi"].mpicc),
                "MPICXX={0}".format(spec["mpi"].mpicxx),
                "MPIF77={0}".format(spec["mpi"].mpif77),
                "MPIFC={0}".format(spec["mpi"].mpifc),
            ]
        )
    return config_args