Chinaunix

标题: 关于使用automake的问题??在线等,请各位大虾帮忙! [打印本页]

作者: free_boy    时间: 2007-12-04 10:11
标题: 关于使用automake的问题??在线等,请各位大虾帮忙!
我在使用automake的时候总是会出现这样一个错误:

automake: `configure.ac' or `configure.in' is required


请各位大虾指点
作者: mymtom    时间: 2007-12-04 16:55
automake 需要扫描 configure.ac 或 configure.in 生成 configure脚本和Makefile.in
作者: mymtom    时间: 2007-12-10 04:01
简单例子:

  1. $ ls
  2. Makefile.am     configure.ac    hello.c
  3. $ aclocal
  4. $ autoheader
  5. $ autoconf
  6. $ automake --add-missing
  7. configure.ac: installing `./install-sh'
  8. configure.ac: installing `./mkinstalldirs'
  9. configure.ac: installing `./missing'
  10. Makefile.am: installing `./depcomp'
  11. $ gmake
  12. gmake: *** No targets specified and no makefile found.  Stop.
  13. $ lf
  14. ./              Makefile.in     config.h.in     depcomp@        missing@
  15. ../             aclocal.m4      configure*      hello.c         mkinstalldirs@
  16. Makefile.am     autom4te.cache/ configure.ac    install-sh@
  17. $ ./configure
  18. checking for a BSD-compatible install... /usr/bin/install -c
  19. checking whether build environment is sane... yes
  20. checking for gawk... gawk
  21. checking whether make sets $(MAKE)... yes
  22. checking for gcc... gcc
  23. checking for C compiler default output file name... a.out
  24. checking whether the C compiler works... yes
  25. checking whether we are cross compiling... no
  26. checking for suffix of executables...
  27. checking for suffix of object files... o
  28. checking whether we are using the GNU C compiler... yes
  29. checking whether gcc accepts -g... yes
  30. checking for gcc option to accept ISO C89... none needed
  31. checking for style of include used by make... GNU
  32. checking dependency style of gcc... gcc3
  33. checking how to run the C preprocessor... gcc -E
  34. checking for grep that handles long lines and -e... /usr/bin/grep
  35. checking for egrep... /usr/bin/grep -E
  36. checking for ANSI C header files... yes
  37. checking for sys/types.h... yes
  38. checking for sys/stat.h... yes
  39. checking for stdlib.h... yes
  40. checking for string.h... yes
  41. checking for memory.h... yes
  42. checking for strings.h... yes
  43. checking for inttypes.h... yes
  44. checking for stdint.h... yes
  45. checking for unistd.h... yes
  46. checking stdio.h usability... yes
  47. checking stdio.h presence... yes
  48. checking for stdio.h... yes
  49. configure: creating ./config.status
  50. config.status: creating Makefile
  51. config.status: WARNING:  Makefile.in seems to ignore the --datarootdir setting
  52. config.status: creating config.h
  53. config.status: executing depfiles commands
  54. $ gmake
  55. gmake  all-am
  56. gmake[1]: Entering directory `/usr/home/mymtom/src/play/automake/hello-1.0'
  57. source='hello.c' object='hello.o' libtool=no \
  58.         depfile='.deps/hello.Po' tmpdepfile='.deps/hello.TPo' \
  59.         depmode=gcc3 /usr/local/bin/bash ./depcomp \
  60.         gcc -DHAVE_CONFIG_H -I. -I. -I.     -g -O2 -c `test -f 'hello.c' || echo './'`hello.c
  61. gcc  -g -O2   -o hello  hello.o  
  62. gmake[1]: Leaving directory `/usr/home/mymtom/src/play/automake/hello-1.0'
  63. $ gmake dist
  64. { test ! -d hello-1.0 || { find hello-1.0 -type d ! -perm -200 -exec chmod u+w {} ';' && rm -fr hello-1.0; }; }
  65. mkdir hello-1.0
  66. find hello-1.0 -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
  67.           ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
  68.           ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
  69.           ! -type d ! -perm -444 -exec /usr/local/bin/bash /usr/home/mymtom/src/play/automake/hello-1.0/install-sh -c -m a+r {} {} \; \
  70.         || chmod -R a+r hello-1.0
  71. /usr/local/bin/bash /usr/home/mymtom/src/play/automake/hello-1.0/missing --run tar chof - hello-1.0 | GZIP=--best gzip -c >hello-1.0.tar.gz
  72. { test ! -d hello-1.0 || { find hello-1.0 -type d ! -perm -200 -exec chmod u+w {} ';' && rm -fr hello-1.0; }; }
  73. $ ls -F
  74. Makefile                config.log              hello.c
  75. Makefile.am             config.status*          hello.o
  76. Makefile.in             configure*              install-sh@
  77. aclocal.m4              configure.ac            missing@
  78. autom4te.cache/         depcomp@                mkinstalldirs@
  79. config.h                hello*                  stamp-h1
  80. config.h.in             hello-1.0.tar.gz
  81. $
复制代码

hello-1.0.tar.gz

613 Bytes, 下载次数: 44






欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2