autoconfig和autoreconfig详解

根据文件configure.ac  或者 configure.in 

1 AC_INIT

<strong>AC_INIT</strong>(package, version, [bug-report], [tar-name])
AC_INIT和 AC_OUTPUT是configure命令必要的2个宏。AC_INIT可以生成如下M4宏指
  • [AC_]PACKAGE_NAME
  • [AC_]PACKAGE_TARNAME
  • [AC_]PACKAGE_VERSION
  • [AC_]PACKAGE_STRING
  • [AC_]PACKAGE_BUGREPORT

2 AC_PREREQ

<strong>AC_PREREQ</strong>(version)
  指出需要的autoconf最低版本号

3 AM_INIT_AUTOMAKE

<span style="font-family: Arial; font-size: 14px; ">AM_INIT_AUTOMAKE(package, version [, no-define])</span>
This macro is always needed for  automake

4 AC_DEFINE

Defines a c preprocessor macro
定义C代码中的宏定义
For example  AC_DEFINE(DEBUG) or  AC_DEFINE(VERSION, "2.3")

AC_DEFINE_UNQUOTED

Defines a preprocessor macro with shell expansion  AC_DEFINE_UNQUOTED(FOO, "${some_variable}")
 定义没用引号的宏,可以在shell中替换变量

6 AC_CHECK_LIB

Checks for a symbol within a library

7  AC_OUTPUT

<strong>AC_OUTPUT</strong>(Makefile foo_config)
There should be an AC_OUTPUT for each  Makefile.am in the project.
AC_INIT and AC_OUTPUT are the two only required macros by the  configure script.
AC_OUTPUT generates the files that are required for the building process.
Lists the names of the files that will be output by the  ./configure script.

8 AM_CONFIG_HEADER

<strong>AM_CONFIG_HEADER</strong>(config.h)
<strong>AM_CONFIG_HEADER</strong>(config.h:config.in)
It may optionally name the input file for the output file, by default this is config.h.in, however, this works poorly on dos.
Names the header file which will hold the preprocessor macro definitions for compile time. Normally, this is config.h. The source files will then  #include "config.h".
Generates a portability header file, requires a  accconfig.h file.


   
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值