def METHOD_NAME(self, spec, prefix):
    """Configure function"""
    # Base options
    options = [
        "CFLAGS=-Ofast",
        "FFLAGS=-Kfast",
        "--enable-sve",
        "--enable-armv8-cntvct-el0",
        "--enable-fma",
        "--enable-fortran",
        "--prefix={0}".format(prefix),
        "ac_cv_prog_f77_v=-###",
    ]
    if "+shared" in spec:
        options.append("--enable-shared")
    else:
        options.append("--disable-shared")
    if "+openmp" in spec:
        options.append("--enable-openmp")
        options.append("OPENMP_CFLAGS=-Kopenmp")
    else:
        options.append("--disable-openmp")
    if "+threads" in spec:
        options.append("--enable-threads")
    else:
        options.append("--disable-threads")
    if "+mpi" in spec:
        options.append("--enable-mpi")
    else:
        options.append("--disable-mpi")
    # Double is the default precision, for all the others we need
    # to enable the corresponding option.
    enable_precision = {
        "float": ["--enable-float"],
        "double": None,
        "long_double": ["--enable-long-double"],
        "quad": ["--enable-quad-precision"],
    }
    # Different precisions must be configured and compiled one at a time
    METHOD_NAME = Executable("../configure")
    for precision in self.selected_precisions:
        opts = (enable_precision[precision] or []) + options[:]
        with working_dir(precision, create=True):
            METHOD_NAME(*opts)