On Mon, 19 Mar 2007, chromatic wrote:

> On Monday 19 March 2007 08:19, Andy Dougherty wrote:
> 
> > This one falls over immediately during Configure.  Even setting
> > verbose=2, I don't see why:
> >
> >     Parrot Version 0.4.9 Configure 2.0
> >     Copyright (C) 2001-2007, The Perl Foundation.
> >
> >     [ . . . ]
> >
> >     Determining what C compiler and linker to use...
> >     No compiler found (tried 'cc')
> >
> > Yet 'cc' works perfectly fine, and has for years.  I have changed
> > nothing in my build scripts.
> 
> The heuristic for detecting a compiler is to invoke it with some sort of help 
> flag, where $cc contains the executable name of your compiler:
> 
>       $cc -h
>       $cc --help
>       $cc /?
> 
> If there's another option to pass to your compiler that causes it to do 
> nothing except exit with a successful error code, we can put it in there.  
> (Checking $ENV{PATH} and trying to divine the proper extension is another 
> option, but I like that one a little less.)

In my opinion, that way lies madness.  Generating a list of options which 
all possible current and future compilers will accept is not only 
impossible, it's pointless.  It's also aggravating that there's no way to 
override it or tell Configure "Yes, cc is my compiler even though it's not 
in your list."

The only way to tell for sure if you have a working compiler is to try to 
compile and run something.  After the user has been prompted for all the 
flags, simply try to compile and run a simple test program.  If it works, 
fine.  If it doesn't, then complain with an informative error message. (It 
may be appropriate to skip the 'run' step in a cross-compilation 
environment and hope that the user got the flags right if the compilation 
succeeds.)

-- 
    Andy Dougherty              [EMAIL PROTECTED]

Reply via email to