[Flac-dev] flac-1.1.2 configure and Makefile fixes

Chris Csanady csanady at gmail.com
Mon Mar 14 07:23:40 PST 2005


> +test "$AS" = "as" && as --version | grep GNU >/dev/null && AS=gas

The above does not work quite as expected due to several issues.  First of
all, configure will hang as the apple as expects input on stdin if no
source file is
specified.  Also, the version version flag is -v; though it will print
the version
when it doesn't understand the --version flag, it uses stderr, so the
grep doesn't
see it.  The last issue is that both the apple and gnu as have GNU in
the version:

% as -v
Apple Computer, Inc. version cctools-525.obj~1, GNU assembler version 1.38

Considering the above, it is probably best to check for the apple as
explicitly, and
make sure the stdio goes where it should.  Perhaps something like the following:

AC_CHECK_PROGS(AS, [as gas])
test "$AS" = "as" && as -v < /dev/null 2>&1 | grep Apple >/dev/null || AS=gas

One problem not addressed is that some linux distributions (maybe not ppc)
have no gas binary, only gas is installed as as.  In this case, the AS=gas would
not be right, but the hard coded binary name in the ppc/gas/Makefile.am would
prevent it from working anyway.

Chris


More information about the Flac-dev mailing list