Can you “un-precious” a configure variable (inverse of AC_ARG_VAR)?

谁说胖子不能爱 提交于 2020-01-07 03:04:49

问题


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

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.


Motivation

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.


回答1:


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

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


来源:https://stackoverflow.com/questions/34257795/can-you-un-precious-a-configure-variable-inverse-of-ac-arg-var

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!