[MPlayer-dev-eng] configure cc

Ivan Kalvachev ikalvachev at gmail.com
Sun Nov 27 16:50:13 CET 2005


Hi,

I already have new big HDD  and just like numerous mplayer developer I
had tried to speedup mplayer building process by ccache. Being a
little paranoid about it I would like to first test it without making
ccache a system wide (aka making overriding gcc links to ccache).

So I tried to override it with export CC=ccache.
Fair enough ./configure ignored it completely. Then I tried to use
--cc=ccache, that had nearly same effect. Now it comes time for
inspection of configure.

So.
_cc=cc
test "$CC" && _"$CC"

it looks like we always start with some compiler. This seems right as we have
_cc on architecture detection that is before the compiler checking
(some amd64 stuff).

Now what amazes me is this code snippet:

for _cc in "$_cc" gcc gcc-3.4 gcc-3.3 gcc-3.2 gcc-3.1 gcc3 gcc-3.0 cc ; do
  echocheck "$_cc version"
  cc_vendor=gnu

For some reason our configure script believe all cc compilers to be
always gnu and always tries to extract version info from it, like it
is gcc.

Somehow I think this is wrong, very wrong.

I understand that probably this could be avoided by
--disable-gcc-checking, but...

In my scenario the gcc check tries the ccache, fails to query the
version info and tries the next compiler, fortunately i have gcc and
it happily identifies it.

How, how it should be fixed is quite an interesting topic.

My guess is that we must query the -v string, see if it says gcc. If
it does make the gcc check. If it doesn't display warning for
unsupported compiler (and encourage the people to report if it works
and how to identify it).

I'm waiting for you opinion.

---
I'm not afraid to make fool of myself, as long as I complete my goal.
   Ivan Kalvachev
  iive

P.S.
Note i don't even rise the topic about identifing underlying compiler
that ccache is going to use...




More information about the MPlayer-dev-eng mailing list