“帮助"“configure --help"的字符串变量替换; [英] "Help" string variable substitution for "configure --help"

查看:31
本文介绍了“帮助"“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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆