configure - 自动生成错误

标签 configure autotools autoconf automake

我正在尝试为 hello world 示例 C 程序创建安装包。

我已经完成了以下步骤。

自动扫描

mv 配置.扫描配置.ac 编辑configure.ac以添加一些宏。

aclocal

中创建 Makefile.am
bin_PROGRAMS = hello
hello_SOURCES = hello.c

最后我做了 automake 。

然后我收到了以下消息。 .

configure.ac:12: error: required file './compile' not found
configure.ac:12:   'automake --add-missing' can install 'compile'
configure.ac:6: error: required file './missing' not found
configure.ac:6:   'automake --add-missing' can install 'missing'
Makefile.am: error: required file './INSTALL' not found
Makefile.am:   'automake --add-missing' can install 'INSTALL'
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
Makefile.am: error: required file './COPYING' not found
Makefile.am:   'automake --add-missing' can install 'COPYING'
Makefile.am: error: required file './depcomp' not found
Makefile.am:   'automake --add-missing' can install 'depcomp'

没有任何字符串,包括 compilemissingNEWREADME 或消息所说的Makefile.am 中需要一个configure.ac 文件。

我应该做什么?

这些是有关某些产品版本的信息。

CentOS 6.4 版本

autocomf-2.69

automake-1.14

m4-1.4

最佳答案

这些文件需要存在才能符合标准的“automake/autoconf”文件集。

按照它为您提供的说明进行操作:“automake --add-missing”,丢失的文件将使用虚拟信息创建,您将(在完美的世界中)适当填写这些信息。

尝试仔细阅读 autotools tutorial ,或者可能是 autobook 。另请参阅StackOverflow: Getting started with autotools .

此外,请阅读手册页,尝试 automake --help,阅读实用程序输出的内容来帮助您?

关于configure - 自动生成错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21773003/

相关文章:

c++ - 海合会 |源码编译麻烦

c++ - Automake 不在子目录中生成 Makefile.in

c - 如何将 ws2_32.lib 与 autotools 链接

c++ - 如何告诉 AC_SUBST 不要替换参数中的变量?

compilation - 如何使用相同的参数重新运行./configure?

windows - 使用 libsodium 构建 libzmq

visual-studio - 使用 SCons TryCompile 检查 Windows 上的编译器标志支持

android-ndk - 配置无法识别androideabi

c - 通过 AC_DEFINE 给宏一个整数值

c++ - 如何使用 Autoconf 通过 "./configure"设置定义