Automake的错误'./ltmain.sh'未找到 [英] Automake error './ltmain.sh' not found
问题描述
我已经通过使用安装MinGW和MSYS 的MinGW-GET-SETUP.EXE
。我还安装了自动工具(的autoconf,automake的,M4,libtool的)到 C:\\ /选择/自动工具
。
I've installed mingw and msys by using mingw-get-setup.exe
. I've also installed Autotools(autoconf, automake,m4,libtool) into C:\/opt/autotools
.
当我运行automake的,下面的错误总是发生:
When I run automake, the following error always occurs:
configure.ac:11: error: required file './ltmain.sh' not found
如果我复制 ltmain.sh
从libtool的的安装树,执行将正常完成。
If I copy ltmain.sh
from libtool’s installed tree, execution will finish normally.
我怎么能configuure automake的找到 ltmain.sh
而不进行复制?
How can I configuure automake to find ltmain.sh
without copying?
推荐答案
在的autoconf
/ 的automake
/ 的libtool
项目你必须调用:
In an autoconf
/automake
/libtool
project you have to invoke:
-
libtoolize
:这个拷贝/链接一些支持脚本,包括ltmain.sh
(它的主要成分是的libtool)。 -
aclocal会
:此查找你的配置脚本需要,并在本地副本更轻松地访问所有的m4宏 -
autoheader就
:可选的,如果你想使用的config.h
/AC_CONFIG_HEADERS
,否则当你调用编译器。 所有的测试结果宏将被内联 -
的autoconf
:扩大使用configure.ac
到配置的所有宏
脚本。 -
的automake
:把所有的Makefile.am
到Makefile.in
模板。你可能想用来调用这个 - 添加缺失
所以额外支持的脚本可以链接/复制到你的项目(如编译
,缺少
,depcomp
,测试驱动程序
等)。
libtoolize
: this copies/links a few support scripts, includingltmain.sh
(which is the main component of libtool).aclocal
: this looks up all m4 macros that your configure script will need, and make a local copy for easier access.autoheader
: optional, if you want to useconfig.h
/AC_CONFIG_HEADERS
, otherwise all the test result macros will be inlined when you call the compiler.autoconf
: to expand all the macros used byconfigure.ac
into theconfigure
script.automake
: to convert all theMakefile.am
intoMakefile.in
templates. You probably want to invoke this with--add-missing
so additional support scripts can be linked/copied to your project (such ascompile
,missing
,depcomp
,test-driver
, etc).
您很可能会想一个引导
脚本添加到您的每一个项目,即调用所有的这些工具,在这个秩序。或者你可以偷懒,只调用 autoreconf -i
,看看是否适合您的项目。
You'll most likely want to add a bootstrap
script to each of your projects, that invokes all of those tools, in this order. Or you could be lazy and just invoke autoreconf -i
and see if that works for your project.
(虽然)你有工作的Makefile
■通过配置脚本生成后,自动工具需要自己照顾自己;也就是说,如果您编辑 configure.ac
或任何 Makefile.am
,正确的工具上面将被再次调用把一切都更新,只需运行制作
。只是要小心,不创建在 Makefile.am
文件的语法错误,否则,你可能最终破裂的Makefile
S,引起制作
来拒绝运行 - 在这种情况下,你必须运行引导
脚本(或 autoreconf
)手动。
After (and while) you have working Makefile
s generated by the configure script, autotools takes care of itself; that is, if you edit configure.ac
, or any Makefile.am
, the correct tools above will be invoked again to keep everything updated, by simply running make
. Just be careful to not create a syntax error in the Makefile.am
files, otherwise you might end up with broken Makefile
s, causing make
to refuse to run - in which case you have to run the bootstrap
script (or autoreconf
) manually.
这篇关于Automake的错误'./ltmain.sh'未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!