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

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

 



On Thu, Aug 6, 2009 at 03:52, Dr. David Kirkby<david.kirkby@xxxxxxxxxx> 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 <andrew.w.nosenko@xxxxxxxxx>


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux