autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to test compiler and create messaged based on version of gcc?


From: Andrew W. Nosenko
Subject: Re: How to test compiler and create messaged based on version of gcc?
Date: Thu, 6 Aug 2009 10:37:59 +0300

On Thu, Aug 6, 2009 at 03:52, Dr. David Kirkby<address@hidden> wrote:
> Philip Herron wrote:
>> you could add in the check:
>>
>> if test x$CC = xgcc ; then
>
> Thank you, that looks like what I want.

No!  GCC may have a bunch of names, not only 'gcc'.
The proper way is check variable $GCC for value 'yes':
    if test x$GCC = xyes
    then
        # ...
    else
        # ...
    fi
See autoconf documentation, node 'C Compiler Characteristics', macro AC_PROG_CC.

-- 
Andrew W. Nosenko <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]