autoconf
[Top][All Lists]
Advanced

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

Re: How to get autoconf to respect CC="gcc -std=c89"?


From: Zack Weinberg
Subject: Re: How to get autoconf to respect CC="gcc -std=c89"?
Date: Wed, 11 Oct 2023 10:10:27 -0400
User-agent: Cyrus-JMAP/3.9.0-alpha0-1019-ged83ad8595-fm-20231002.001-ged83ad85

On Wed, Oct 11, 2023, at 9:34 AM, Evgeny Grin wrote:
> On 11.10.2023 16:29, Bob Friesenhahn wrote:
>> The problem is that Autoconf is defeating the recipient's freedom to
>> select the compilation settings used.
>>
>> The person who is compiling the software should be able to specify
>> the parameters to use used.
>
> It works, actually. ./configure CC=gcc CFLAGS=-std=c89
>
> C99 check would fail, compiler would be accepted as C89-compatible.

This only works if both configure.ac and all the Makefiles have been
written "correctly".  I put "correctly" in quotes because, yes, it *is*
how you should write them, and it *is* what you get if you aren't trying
to do anything complicated -- but if you *do* need to do something
complicated, it is very easy to break this property by accident and
without noticing.  And I don't think everything you need to do to avoid
breaking it is documented, so we can't even claim that we warned people.

zw



reply via email to

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