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

查看:200
本文介绍了如何在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(如果使用的是自动制作):

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天全站免登陆