|
|
我按照网上的这篇http://fanqiang.chinaunix.net/system/linux/2005-12-14/3926.shtml 试着用automake生成Makefile.可以一直没有成功:
先写了一个简单的c程序 hello.c
- int main(int argc,char **argv)
- {
- printf("hello,the world\n");
- return 0;
- }
复制代码
然后执行autoscan,显示如下
[huting@MagicLinux hello]$ autoscan
autom4te: configure.ac: no such file or directory
autoscan: /usr/bin/autom4te failed with exit status: 1
但是ls显示已经有一个configure.scan文件了.我将这个文件改为configure.in并且修改成
[huting@MagicLinux hello]$ cat configure.in
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
##AC_PREREQ(2.59)
AC_INIT(hello.c)
AC_INIT(hello, 0.1)
#AC_CONFIG_SRCDIR([hello.c])
#AC_CONFIG_HEADER([config.h])
# 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_OUTPUT(Makefile)
[huting@MagicLinux hello]$
再运行 aclocal ,显示如下
[huting@MagicLinux hello]$ aclocal
/usr/share/aclocal/smpeg.m4:13: warning: underquoted definition of AM_PATH_SMPEG
run info '(automake)Extending aclocal'
or see http://sources.redhat.com/automa ... l#Extending-aclocal
/usr/share/aclocal/libfame.m4:6: warning: underquoted definition of AM_PATH_LIBFAME
/usr/share/aclocal/gtk.m4:7: warning: underquoted definition of AM_PATH_GTK
/usr/share/aclocal/gpg-error.m4:7: warning: underquoted definition of AM_PATH_GPG_ERROR
/usr/share/aclocal/ao.m4:9: warning: underquoted definition of XIPH_PATH_AO
/usr/share/aclocal/aalib.m4:12: warning: underquoted definition of AM_PATH_AALIB
NONE:0: error: m4_init: unbalanced m4_divert_push:
configure.in:5: m4_divert_push: BODY
configure.in:5: m4_divert_push: KILL
NONE:0: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
aclocal: autom4te failed with exit status: 1
[huting@MagicLinux hello]$
运行 autoconf
[huting@MagicLinux hello]$ autoconf
NONE:0: error: m4_init: unbalanced m4_divert_push:
configure.in:5: m4_divert_push: BODY
configure.in:5: m4_divert_push: KILL
NONE:0: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
[huting@MagicLinux hello]$
这时ls一下,发现并没有生成aclocal.m4 和configure.
能告诉我问题出在什么地方吗?
谢谢! |
|