如何在 Autoconf 中包含 .m4 文件? [英] How to include .m4 files in Autoconf?

查看:38
本文介绍了如何在 Autoconf 中包含 .m4 文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I have downloaded a macro from Autoconf Archive, and I want to use it. What do I have to put in my configure.ac file to make use this macro?

推荐答案

您可能需要将 AC_CONFIG_MACRO_DIR 添加到 configure.ac 到宏所在目录:

You may want to add AC_CONFIG_MACRO_DIR to configure.ac to the directory where the macro is:

AC_CONFIG_MACRO_DIR([path/to/macros])

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

You'll need to invoke the macro somewhere in this file also.

并且在 Makefile.am 中,您可能需要设置 ACLOCAL_AMFLAGS(如果您使用的是 automake):

and in Makefile.am you'll probably need to set up ACLOCAL_AMFLAGS (if you are using automake):

ACLOCAL_AMFLAGS         = -I path/to/macros

然后调用 autoreconf -fvi 就可以了.

Then invoke autoreconf -fvi and you should be set.

这篇关于如何在 Autoconf 中包含 .m4 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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