linux - autotools 中的 automake 错误消息

标签 linux autotools configure autoconf automake

我是第一次尝试使用 Autotools。我设法用手写的 Makefile.in 编译了我的代码。并使用 autoconf(./configure make)。

但是现在,我决定使用 Automake 生成一个 Makefile.in 使用 Makefile.am

我的 Makefile.am:

bin_PROGRAMS=hello_portable
hello_portable_SOURCES=hello_portable.c

我的 configure.ac 由自动扫描自动生成:

AC_PREREQ([2.69])
AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS])
AM_INIT_AUTOMAKE(summary, 1.0.0)
AC_CONFIG_SRCDIR([hello_portable.c])
AC_CONFIG_HEADERS([config.h])

# Checks for programs.
AC_PROG_CC

# Checks for libraries.

# Checks for header files.
AC_CHECK_HEADERS([sys/time.h])

# Checks for typedefs, structures, and compiler characteristics.

# Checks for library functions.
AC_CHECK_FUNCS([gettimeofday])

AC_OUTPUT

当我执行 automake 以生成 Makefile.in 时

# automake --add-missing

configure.ac: error: no proper invocation of AM_INIT_AUTOMAKE was found.
configure.ac: You should verify that configure.ac invokes AM_INIT_AUTOMAKE,
configure.ac: that aclocal.m4 is present in the top-level directory,
configure.ac: and that aclocal.m4 was recently regenerated (using aclocal)
Makefile.am: error: required file './NEWS' not found
Makefile.am: error: required file './README' not found
Makefile.am: error: required file './AUTHORS' not found
Makefile.am: error: required file './ChangeLog' not found
/usr/share/automake-1.14/am/depend2.am: error: am__fastdepCC does not appear in AM_CONDITIONAL
/usr/share/automake-1.14/am/depend2.am:   The usual way to define 'am__fastdepCC' is to add 'AC_PROG_CC'
/usr/share/automake-1.14/am/depend2.am:   to 'configure.ac' and run 'aclocal' and 'autoconf' again
/usr/share/automake-1.14/am/depend2.am: error: AMDEP does not appear in AM_CONDITIONAL
/usr/share/automake-1.14/am/depend2.am:   The usual way to define 'AMDEP' is to add one of the compiler tests
/usr/share/automake-1.14/am/depend2.am:     AC_PROG_CC, AC_PROG_CXX, AC_PROG_OBJC, AC_PROG_OBJCXX,
/usr/share/automake-1.14/am/depend2.am:     AM_PROG_AS, AM_PROG_GCJ, AM_PROG_UPC
/usr/share/automake-1.14/am/depend2.am:   to 'configure.ac' and run 'aclocal' and 'autoconf' again

我做错了什么

最佳答案

你必须逐行修复它。 首先,创建Makefile.am需要的所有新文件。(这一步你也可以运行'automake --add-missing'来自动添加丢失的文件) $ touch 新闻自述文件作者更改日志 其次,您必须在 automake 之前运行 aclocal。 $ 本地 最后,您可以运行 automake。 $ 汽车制造商

关于linux - autotools 中的 automake 错误消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33410463/

相关文章:

java - 从 java 执行 hadoop 示例 jar 文件

linux - 是否可以在远程 shell 脚本中调用函数?

python - 如何在 dreambox 的启动/启动时运行基于 enigma2 的插件?

ssl - 客户端 : While using tortoiseSVN my access to the server is forbidden, 但我在使用浏览器时确实可以访问

linux - 编译zabbix-server时未找到z库

ubuntu - ffmpeg 配置错误 : libx264 not found

linux - 如何在 Knoppix 中设置 PATH?

linux - 如何将自动制作文件写入递归构建子目录?

linux - 是否有人有补丁或 kludge 技巧,以便我能够使用 gnutls-2.12.5 交叉编译 climm-0.6.4?

autotools - 抑制不必要的输出到 config.h.in