linux下自动生成makefile,自动生成makefile出错(已解决)

[i=s] 本帖最后由 chengshiding 于 2010-12-8 21:24 编辑 [/i]

在hello目录里编写hello.c文件。内容为

#include int main(int argc, char** argv)

{

printf("Hello, GUN\n");

return 0;

}

然后执行autoscan, 重命名configure.scan为configure.in 并编辑它

内容为

AC_PREREQ([2.65])

AC_INIT(hello, 1.0, chengshiding@yeah.net)

AC_CONFIG_SRCDIR([hello.c])

AM_CONFIG_HEADERS([config.h])

AM_INIT_AUTOMAKE(hello, 1.0)

# Checks for programs.

AC_PROG_CC

# Checks for libraries.

# Checks for header files.

# Checks for typedefs, structures, and compiler characteristics.

# Checks for library functions.

AC_CONFIG_FILES([Makefile])

AC_OUTPUT

然后执行 aclocal

出现警告

#aclocal

configure.ac:7: warning: macro `AM_CONFIG_HEADERS' not found in library

继续执行 autoconf

出现错误

#autoconf

configure.ac:7: error: possibly undefined macro: AM_CONFIG_HEADERS

If this token and others are legitimate, please use m4_pattern_allow.

See the Autoconf documentation.

继续执行 automake --add-missing

继续执行

#./configure

./configure: line 1750: syntax error near unexpected token `config.h'

./configure: line 1750: `AM_CONFIG_HEADERS(config.h)'

出错了 , 最后就没有makefile生成。

那位高手指点一二 !! 谢谢!!!

最后说明在ubuntu 10.04下执行的

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值