gpt4 book ai didi

autotools - "Help"字符串变量替换为 "configure --help"

转载 作者:行者123 更新时间:2023-12-05 01:02:00 27 4
gpt4 key购买 nike

我有一个字符串,我想多次使用它来输出 configure --help .所以我尝试在 configure.ac 中做这样的事情:

AC_ARG_ENABLE([foobar],
AS_HELP_STRING([--enable-foobar], [$foobar_help_str]))

但是没有进行扩展或替换,所以输出只是 $foobar_help_str .

最佳答案

将字符串定义为 M4 宏:

m4_define([FOOBAR_HELP_STR], [Turn on the foobar features])
AC_ARG_ENABLE([foobar], [AS_HELP_STRING([--enable-foobar], FOOBAR_HELP_STR)])

关于autotools - "Help"字符串变量替换为 "configure --help",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27218758/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com