Terje Bless <link(a)rito.no> wrote:
---------------------------------------------------------------------|----+-
----
>...I just built GCC 2.95 on a Red Hat 6.0 box and removed the egcs
rpms.
>This broke the config.guess (and thus breaks "configure") from XEmacs
>21.1.4. Somewhere in there it does a "ld --help" to extract the
>"supported emulations". For some strange reason, it only finds
"elf_i386"
>and not "i386linux". I assume this is because ld's output format
changed
>and the sed filter breaks, but I don't speak sed so I'm not sure. Forcing
>"i586-pc-linux" as an argument to "configure" works.
Looking at the config.guess script it should _not_ find i386linux because
that is a.out. Something else must be wrong. [...] Surely we would have
know by now if every autoconf 2.13 based program stopped configuring
correctly with gcc 2.95 on redhat. So I suggest you double check your gcc
2.95 install:
Ok, I finally had time to investigate this. Everyone is, of course, right
and I bungled this. What happened was that when I removed the egcs 1.1.2 rpm
from RedHat 6.0, I also removed the "cc" link that it installed. gcc 2.9.5
does not install such a link. Thus, "cc" was no longer in my path.
"configure" and "config.guess" tries to call the compiler with
"${CC-cc}"
(which I thought meant "$CC or $cc" not "$CC or cc"; thus the
confusion.
Sorry about that!). Since $CC isn't set and "cc" isn't in my path,
compiling
the test program fails and "config.guess" exits silently with status
"1".
Now, this was without doubt my little brainfart, but OTOH it would be
prudent of "configure" to check if a compiler is available before trying to
use it. It obviously finds it later, as giving the config name works, but
wouldn't be better to do that check before the first use of the compiler? Or
at least complain when $CC and "cc" is not found and/or when
"config.guess"
returns an error?
-link