“帮助"字符串变量替换为"configure --help" [英] "Help" string variable substitution for "configure --help"
本文介绍了“帮助"字符串变量替换为"configure --help"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个字符串,我想多次将其用于configure --help
的输出.所以我尝试在configure.ac
中做这样的事情:
I have a string that I want to use multiple times for the output of configure --help
. So I try doing something like this in configure.ac
:
AC_ARG_ENABLE([foobar],
AS_HELP_STRING([--enable-foobar], [$foobar_help_str]))
但是没有进行扩展或替换,因此输出仅为$foobar_help_str
.
But no expansion or substitution is done, so the output is just $foobar_help_str
.
推荐答案
将字符串定义为M4宏:
Define the string as an M4 macro:
m4_define([FOOBAR_HELP_STR], [Turn on the foobar features])
AC_ARG_ENABLE([foobar], [AS_HELP_STRING([--enable-foobar], FOOBAR_HELP_STR)])
这篇关于“帮助"字符串变量替换为"configure --help"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文