[Flac-dev] Strange autotools check order in autogen.sh

LRN lrn1986 at gmail.com
Sat Aug 22 19:07:47 PDT 2009


    for am in automake-$AM_NEEDED automake$AM_NEEDED \
    automake automake-1.7 automake-1.8 automake-1.9 automake-1.10; do


This code makes it check for automake-1.7 (AM_NEEDED evaluates to 1.7),
then automake (unversioned wrapper), then 1.7 (again), 1.8, 1.9 and then
1.10

1) Why the check is generally ascending? Isn't it better use the most
recent version that is known to work instead of using the oldest
compatible version?
2) Why automake wrapper is checked before versioned automakes? If you
want to stick to the oldest version available, you should make the
wrapper check to be the last one, because it will generally give you
some unknown (but probably relatively recent) version that will work
(or, at least, it thinks it will work, and i suspect that it knows
better than you do)

I'm raising this issue because i've encountered strange errors in
makefile (generated with autogen and configure). At first i suspected
libtool to be the troublemaker, but eventually i was only able to
resolve them when i hacked autogen.sh to call the wrappers for automake
and aclocal instead of using explicit 1.7 (which is what it does, since
AM_NEEDED evaluates to 1.7).

This is the first time i'm getting such errors. It is probably caused by
the fact that i've updated my MinGW/MSys environment to the most recent
version (which comes with special mingw/msys version of autotools).
Still, i'm not having such issues with other projects i've been
configuring in this new environment, because they are mostly using
wrappers right away or checking for autotools in descending order.

The errors (for reference):
make[4]: Entering directory `/c/src/flac/src/libFLAC'
if /bin/sh ../../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I.
-I../..   -DFLaC__INLINE=inline -DNDEBUG -I../.. -I./include
-I../../include -fno-common -I/usr/local/include    -O3 -funroll-loops
-finline-functions -Wall
 -W -Winline -g -O2 -MT bitmath.lo -MD -MP -MF ".deps/bitmath.Tpo" \
          -c -o bitmath.lo `test -f 'bitmath.c' || echo './'`bitmath.c; \
        then mv -f ".deps/bitmath.Tpo" ".deps/bitmath.Plo"; \
        else rm -f ".deps/bitmath.Tpo"; exit 1; \
        fi
../../libtool: line 866: X--mode=compile: command not found
../../libtool: line 1033: *** Warning: inferring the mode of operation
is deprecated.: command not found
../../libtool: line 1034: *** Future versions of Libtool will require
--mode=MODE be specified.: command not found
../../libtool: line 1177: Xgcc: command not found
../../libtool: line 1177: X-DHAVE_CONFIG_H: command not found
../../libtool: line 1177: X-I.: command not found
../../libtool: line 1177: X-I.: command not found
../../libtool: line 1177: X-I../..: is a directory
../../libtool: line 1177: X-DFLaC__INLINE=inline: command not found
../../libtool: line 1177: X-DNDEBUG: command not found
../../libtool: line 1177: X-I../..: is a directory
../../libtool: line 1177: X-I./include: No such file or directory
../../libtool: line 1177: X-I../../include: is a directory
../../libtool: line 1177: X-fno-common: command not found
../../libtool: line 1177: X-I/usr/local/include: No such file or directory
../../libtool: line 1177: X-O3: command not found
../../libtool: line 1177: X-funroll-loops: command not found
../../libtool: line 1177: X-finline-functions: command not found
../../libtool: line 1177: X-Wall: command not found
../../libtool: line 1177: X-W: command not found
../../libtool: line 1177: X-Winline: command not found
../../libtool: line 1177: X-g: command not found
../../libtool: line 1177: X-O2: command not found
../../libtool: line 1177: X-MT: command not found
../../libtool: line 1177: Xbitmath.lo: command not found
../../libtool: line 1177: X-MD: command not found
../../libtool: line 1177: X-MP: command not found
../../libtool: line 1177: X-MF: command not found
../../libtool: line 1177: X.deps/bitmath.Tpo: No such file or directory
../../libtool: line 1177: X-c: command not found
../../libtool: line 1229: Xbitmath.lo: command not found
../../libtool: line 1234: libtool: compile: cannot determine name of
library object from `': command not found
make[4]: *** [bitmath.lo] Error 1


More information about the Flac-dev mailing list