本文介绍了您能“不珍贵"吗?一个配置变量(AC_ARG_VAR的倒数)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

AC_ARG_VAR 宏声明了一个宝贵的变量,该变量具有某些缓存检查的含义.

The AC_ARG_VAR macro declares a variable precious which has certain cache-checking implications.

某些configure宏将某些变量声明为珍贵的,我想撤消这一点.例如,AC_PROG_CC会将CFLAGS声明为珍贵,而我需要使其不珍贵.

Some configure macros declare certain variables precious, and I would like to undo that. For example, AC_PROG_CC will declare CFLAGS as precious, and I need to make it non-precious.

这样做可以让我在顶级配置中修改CFLAGS,并允许子包配置在不与缓存的CFLAGS值冲突的情况下执行.有关更多背景信息,请参见此问题.

Doing this would allow me to modify CFLAGS in a top-level configure and allow sub-package configures to execute without clashing with cached CFLAGS value. See this question for more background.

推荐答案

AC_DEFUN([AX_UNPRECIOUS], [
    m4_define([_AC_PRECIOUS_VARS], m4_bpatsubst(_AC_PRECIOUS_VARS, [$1
], []))
])

AX_UNPRECIOUS([CFLAGS])
AX_UNPRECIOUS([CXXFLAGS])
...

这篇关于您能“不珍贵"吗?一个配置变量(AC_ARG_VAR的倒数)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-26 14:06