def METHOD_NAME(self):
    env = VirtualBuildEnv(self)
    env.METHOD_NAME()
    tc = AutotoolsToolchain(self)
    extra_asflags = []
    extra_cflags = []
    extra_ldflags = []
    args = {
        "--bit-depth": self.options.bit_depth,
        "--disable-cli": "",
        "--sbindir": None,          # Not understood by configure
        "--oldincludedir": None     # Not understood by configure
    }
    args["--disable-shared"] = None # --disable-shared is not understood
    if self.options.shared:
        args["--enable-shared"] = ""
    else:
        args["--enable-static"] = ""
    if self.options.get_safe("fPIC", self.settings.os != "Windows"):
        args["--enable-pic"] = ""
    if self.settings.build_type == "Debug":
        args["--enable-debug"] = ""
    if is_apple_os(self) and self.settings.arch == "armv8":
        # bitstream-a.S:29:18: error: unknown token in expression
        extra_asflags.append("-arch arm64")
        extra_ldflags.append("-arch arm64")
        args["--host"] = "aarch64-apple-darwin"
        if self.settings.os != "Macos": # TODO not sure why this is != "Macos" ... shouldn't it be == ??
            xcrun = XCRun(self)
            platform_flags = ["-isysroot", xcrun.sdk_path]
            apple_min_version_flag = AutotoolsToolchain(self).apple_min_version_flag
            if apple_min_version_flag:
                platform_flags.append(apple_min_version_flag)
            extra_asflags.extend(platform_flags)
            extra_cflags.extend(platform_flags)
            extra_ldflags.extend(platform_flags)
    if self._with_nasm:
        env = Environment()
        # FIXME: get using user_build_info
        env.define("AS", unix_path(self, os.path.join(self.dependencies.build["nasm"].package_folder, "bin", "nasm{}".format(".exe" if self.settings.os == "Windows" else ""))))
        env.vars(self).save_script("conanbuild_nasm")
    if cross_building(self):
        if self.settings.os == "Android":
            # the as of ndk does not work well for building libx264
            env = Environment()
            compilers_from_conf = self.conf.get("tools.build:compiler_executables", default={}, check_type=dict)
            buildenv_vars = VirtualBuildEnv(self).vars()
            cc = compilers_from_conf.get("c", buildenv_vars.get("CC", "clang-cl"))
            env.define("AS", cc)
            ndk_root = self.conf.get("tools.android:ndk_path")
            arch = {
                "armv7": "arm",
                "armv8": "aarch64",
                "x86": "i686",
                "x86_64": "x86_64",
            }.get(str(self.settings.arch))
            abi = "androideabi" if self.settings.arch == "armv7" else "android"
            args["--cross-prefix"] = f"{ndk_root}/bin/{arch}-linux-{abi}-"
            env.vars(self).save_script("conanbuild_android")
    if is_msvc(self):
        env = Environment()
        env.define("CC", "cl -nologo")
        if check_min_vs(self, 180, False):
            extra_cflags.append("-FS")
        env.vars(self).save_script("conanbuild_msvc")
    if extra_asflags:
        args["--extra-asflags"] = " ".join(extra_asflags)
    if extra_cflags:
        args["--extra-cflags"] = " ".join(extra_cflags)
    if extra_ldflags:
        args["--extra-ldflags"] = " ".join(extra_ldflags)
    tc.update_configure_args(args)
    tc.METHOD_NAME()