autoconf
[Top][All Lists]
Advanced

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

Re: configure sets CFLAGS or how to disable default CFLAGS='-g -O2' for


From: Ed Hartnett
Subject: Re: configure sets CFLAGS or how to disable default CFLAGS='-g -O2' for gcc?
Date: Tue, 04 Apr 2006 18:31:16 -0600
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux)

Ralf Corsepius <address@hidden> writes:

>>         test "x$enable_cflags_setting" = xyes && CFLAGS="$CFLAGS -q64"
>
>> This way, if the user sets CFLAGS, his choice is respected (though it
>> might make the build crash - but that's his problem).
>
> Well, IMO this is your problem and qualifies as a bug in your configure
> script:  You are providing a default that probably is invalid for most
> compilers and is likely to cause building to fail or do something else
> than you expect.

No, this line of configure code is executed only on a system it will
work on.

>
>> If the user doesn't set CFLAGS, then I take the liberty of setting it
>> to what will work on his platform. (Otherwise he will just email me
>> and ask me how to set it, so this saves us all the trouble.)
> If you really want to do something like you do, you'd have to check the
> compilerm, if it accepts "-q64" and if "-q64" actually does what you
> expect it to do.
>
> In short: You have opened a can of worms, you'd better avoid.

I would like to do it the autoconf way, but we use cfortran.h, which
requires a different value in CPPFLAGS for each fortran compiler.

If I don't have my configure script provide that parameter, the build
breaks and the user emails me.

Yes, in theory the user should read the documentation and pick the
right parameters themselves.

Ed

-- 
Ed Hartnett  -- address@hidden





reply via email to

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