def METHOD_NAME(self, spec):
    # Validate chosen variants
    if "+openmp" in spec and "+pthread" in spec:
        msg = "You cannot choose both +openmp and +pthread"
        raise RuntimeError(msg)
    if "~openmp" in spec and "~pthread" in spec:
        msg = "You must choose either +openmp or +pthread"
        raise RuntimeError(msg)
    # List of configuration options
    config = []
    # The machine (platform) identifier to append to the library names
    if "+openmp" in spec:
        # OpenMP
        config.extend(
            [
                "PLAT       = _OPENMP",
                "TMGLIB     = libtmglib.a",
                "MPLIB      = {0}".format(self.compiler.openmp_flag),
                "CFLAGS     = {0}".format(self.compiler.openmp_flag),
                "FFLAGS     = {0}".format(self.compiler.openmp_flag),
                "LOADOPTS   += {0}".format(self.compiler.openmp_flag),
            ]
        )
    elif "+pthread" in spec:
        # POSIX threads
        config.extend(
            [
                "PLAT       = _PTHREAD",
                "TMGLIB     = libtmglib$(PLAT).a",
                "MPLIB      = -lpthread",
            ]
        )
    # The BLAS library
    # NOTE: must link with a single-threaded BLAS library
    if "+blas" in spec:
        config.extend(
            [
                "BLASDEF    = -DUSE_VENDOR_BLAS",
                "BLASLIB    = {0}".format(spec["blas"].libs.ld_flags),
            ]
        )
    else:
        config.append("BLASLIB    = ../lib/libblas$(PLAT).a")
    # Generic options
    config.extend(
        [
            # The name of the libraries to be created/linked to
            "SUPERLULIB = libsuperlu_mt$(PLAT).a",
            "MATHLIB    = -lm",
            # The archiver and the flag(s) to use when building archives
            "ARCH       = ar",
            "ARCHFLAGS  = cr",
            "RANLIB     = {0}".format("ranlib" if which("ranlib") else "echo"),
            # Definitions used by CPP
            "PREDEFS    = -D_$(PLAT)",
            # Compilers and flags
            "CC         = {0}".format(os.environ["CC"]),
            "CFLAGS    += $(PREDEFS)",
            "NOOPTS     = -O0",
            "FORTRAN    = {0}".format(os.environ["FC"]),
            "LOADER     = {0}".format(os.environ["CC"]),
            # C preprocessor defs for compilation
            "CDEFS      = -DAdd_",
        ]
    )
    if "+int64" in spec:
        config.extend(["CFLAGS    += -D_LONGINT"])
    if "+pic" in spec:
        config.extend(
            [
                "CFLAGS     += {0}".format(self.compiler.cc_pic_flag),
                "NOOPTS     += {0}".format(self.compiler.cc_pic_flag),
                "FFLAGS     += {0}".format(self.compiler.f77_pic_flag),
                "LOADOPTS   += {0}".format(self.compiler.cc_pic_flag),
            ]
        )
    # Write configuration options to include file
    with open("make.inc", "w") as inc:
        for option in config:
            inc.write("{0}\n".format(option))