autoconf - 如何在 Autoconf 中包含 .m4 文件?

标签 autoconf

我已经从 Autoconf Archive 下载了一个宏,我想使用它。我必须在我的 configure.ac 文件中放入什么才能使用这个宏?

最佳答案

您可能希望将 AC_CONFIG_MACRO_DIR 添加到 configure.ac到宏所在的目录:

AC_CONFIG_MACRO_DIR([path/to/macros])

您还需要调用此文件中某处的宏。

并在 Makefile.am您可能需要设置 ACLOCAL_AMFLAGS(如果您使用的是 automake):
ACLOCAL_AMFLAGS         = -I path/to/macros

然后调用 autoreconf -fvi你应该被设置。

关于autoconf - 如何在 Autoconf 中包含 .m4 文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5298830/

相关文章:

environment-variables - 将环境变量传递给 autoconf 的 `./configure`

c - 构建 libc (newlib) 结果为 "cannot find -lc"

c - 此 C 示例代码中的 CPU 符号是如何解析的?

linux - 如何在 Amazon Linux AMI EC2 上安装 "autoconf-archive"

autoconf - 为什么 autoconf 脚本中的条件用 "x"前缀变量?

makefile - 为什么automake无法生成Makefile.in

windows - 如何在安装了 Cygwin 的 Windows 上执行 autoconf?

c++ - 如何在 autoconf 中检查 clang 的支持编译标志

autoconf - 加速大型项目的自动配置/配置

autotools - 如何检测m4宏是否存在/可以调用