def METHOD_NAME(self):
    virtual_build_env = VirtualBuildEnv(self)
    virtual_build_env.METHOD_NAME()
    yes_no = lambda v: "yes" if v else "no"
    tc = AutotoolsToolchain(self)
    tc.configure_args.extend([
        f"--enable-debug={yes_no(self.settings.build_type == 'Debug')}",
        "--enable-builddir=no",
        "--enable-docs=no",
    ])
    if self._settings_build.compiler == "apple-clang":
        tc.configure_args.append("--disable-multi-os-directory")
    tc.extra_defines.append("FFI_BUILDING")
    if self.options.shared:
        tc.extra_defines.append("FFI_BUILDING_DLL")
    env = tc.environment()
    if self._settings_build.os == "Windows" and (is_msvc(self) or self.settings.compiler == "clang"):
        build = "{}-{}-{}".format(
            "x86_64" if self._settings_build.arch == "x86_64" else "i686",
            "pc" if self._settings_build.arch == "x86" else "win64",
            "mingw64")
        host = "{}-{}-{}".format(
            "x86_64" if self.settings.arch == "x86_64" else "i686",
            "pc" if self.settings.arch == "x86" else "win64",
            "mingw64")
        tc.update_configure_args({
            "--build": build,
            "--host": host
            })
        if is_msvc(self) and check_min_vs(self, "180", raise_invalid=False):
            # https://github.com/conan-io/conan/issues/6514
            tc.extra_cflags.append("-FS")
        if is_msvc_static_runtime(self):
            tc.extra_defines.append("USE_STATIC_RTL")
        if "d" in msvc_runtime_flag(self):
            tc.extra_defines.append("USE_DEBUG_RTL")
        architecture_flag = ""
        if is_msvc(self):
            if self.settings.arch == "x86_64":
                architecture_flag = "-m64"
            elif self.settings.arch == "x86":
                architecture_flag = "-m32"
        elif self.settings.compiler == "clang":
            architecture_flag = "-clang-cl"
        compile_wrapper = unix_path(self, os.path.join(self.source_folder, "msvcc.sh"))
        if architecture_flag:
            compile_wrapper = f"{compile_wrapper} {architecture_flag}"
        ar_wrapper = unix_path(self, self.dependencies.build["automake"].conf_info.get("user.automake:lib-wrapper"))
        env.define("CC", f"{compile_wrapper}")
        env.define("CXX", f"{compile_wrapper}")
        env.define("LD", "link -nologo")
        env.define("AR", f"{ar_wrapper} \"lib -nologo\"")
        env.define("NM", "dumpbin -symbols")
        env.define("OBJDUMP", ":")
        env.define("RANLIB", ":")
        env.define("STRIP", ":")
        env.define("CXXCPP", "cl -nologo -EP")
        env.define("CPP", "cl -nologo -EP")
        env.define("LIBTOOL", unix_path(self, os.path.join(self.source_folder, "ltmain.sh")))
        env.define("INSTALL", unix_path(self, os.path.join(self.source_folder, "install-sh")))
    tc.METHOD_NAME(env=env)