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
.
When I run automake, the following error always occurs:
configure.ac:11: error: required file './ltmain.sh' not found
If I copy ltmain.sh
from libtool’s installed tree, execution will finish normally.
How can I configuure automake to find ltmain.sh
without copying?
In an
autoconf
/automake
/libtool
project you have to invoke: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).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 invokeautoreconf -i
and see if that works for your project.After (and while) you have working
Makefile
s generated by the configure script, autotools takes care of itself; that is, if you editconfigure.ac
, or anyMakefile.am
, the correct tools above will be invoked again to keep everything updated, by simply runningmake
. Just be careful to not create a syntax error in theMakefile.am
files, otherwise you might end up with brokenMakefile
s, causingmake
to refuse to run - in which case you have to run thebootstrap
script (orautoreconf
) manually.EDIT:
The automake manual says this about aclocal:
And further down:
So there you have it: use
autoreconf -i
to be future-proof, unless you have a very good reason to use the tools directly.