How to find our working compiler

Hi, I am using Turbo Linux and needs to install Samba on it. But it said that could not find gcc. My question is how to find out which compiler is working on my system. I tried echo $CC but it gave me nothing. How can I set environmental compiler to c.
Thanks in advance.

Try usinging the command cc-v this will give your the details of the compiler.

Is gcc installed? You can find out by typing "whereis gcc".
Then, when you run ./configure (or whichever it is that needs it), you should be able to run it like this:
export CC=/path/to/gcc
./configure

Does this help?

Sarah, i tried cc -v but it said command not found.

For the path, whereis gcc givces me the following outuput
gcc:
So I tried find command and it finds the gcc in /gcc-3.01./gcc which is the folder where I unzipped the gcc.
After exporting the PATH to this folder, ./configure still gives me the same messages.

Any ohter idea ?

Hmm, do you have permission to run it? Can you type :
/gcc-3.01./gcc -v
And have it work?

If so, you should be able to:

 export CC="/gcc-3.01./gcc"; ./configure 

Also, try viewing the configure script. Can you set it to the binary manually?

Try this command

/gcc-3.01./gcc -v

this should give your the below message

Using builtin specs.
gcc version 2.95.2 19991024 (release)

Thanks for your help. I got the following messages when export and run configure command.
creating cache ./config.cache
checking LIBRARY_PATH variable... ok
checking GCC_EXEC_PREFIX variable... ok
checking host system type... i686-pc-linux-gnuoldld
checking target system type... i686-pc-linux-gnuoldld
checking build system type... i686-pc-linux-gnuoldld
checking for gcc... /home/gcc-3.0.1/gcc
checking whether the C compiler (/home/gcc-3.0.1/gcc ) works... no
configure: error: installation or configuration problem: C compiler cannot crea.

One hint on internet is to used rpm before gcc. I don't know what is rpm. Any help.

I tried that command and it said.

/gcc-3.0.1/gcc: is a directory

Ahhhh.... I see!

Change to that directory and look either for a gcc executable or for a bin directory that may contain gcc.
So the spec may be CC="/home/gcc-3.0.1/gcc/bin/gcc", or something similar.