Linux下使用aclocal、autoconf、automake、autoheader、configure

来源:互联网 发布:淘宝做什么类目好 编辑:程序博客网 时间:2024/05/21 17:22
  1. ###Date: 2017/9/10

  今天在CentOS6.0上安装内存诊断工具Valgrind的时候,发现了几个开源配置工具,这里记录一下这几个工具的作用。
  1. 1.autoscan (autoconf):
  2. 扫描源代码以搜寻普通的可移植性问题,比如检查编译器,库,头文件等,生成文件configure.scan,它是configure.ac的一个雏形。
  3. 2.aclocal (automake):
  4. 根据已经安装的宏,用户定义宏和acinclude.m4文件中的宏将configure.ac文件所需要的宏集中定义到文件 aclocal.m4中。aclocal是一个perl 脚本程序,它的定义是:“aclocal - create aclocal.m4 by scanning configure.ac”
  5. 3.autoheader(autoconf): 
  6. 根据configure.ac中的某些宏,比如cpp宏定义,运行m4,声称config.h.in
  7. 4.automake: 
  8. automake将Makefile.am中定义的结构建立Makefile.in,然后configure脚本将生成的Makefile.in文件转换为Makefile。如果在configure.ac中定义了一些特殊的宏,比如AC_PROG_LIBTOOL,它会调用libtoolize,否则它会自己产生config.guess和config.sub
  9. 5.autoconf:
  10. 将configure.ac中的宏展开,生成configure脚本。这个过程可能要用到aclocal.m4中定义的宏。

  11.  
  12. 参考:
  13. http://www.cnblogs.com/bugutian/p/5560548.html
  14. http://www.laruence.com/2009/11/18/1154.html(autoconf和automake的详细使用方法)
  15. http://blog.csdn.net/dengzhilong_cpp/article/details/7487243
阅读全文
0 0