This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: Compiler Flags
- To: Simon Richter <Simon dot Richter at phobos dot fachschaften dot tu-muenchen dot de>
- Subject: Re: Compiler Flags
- From: Tom Tromey <tromey at cygnus dot com>
- Date: 18 Nov 2000 13:40:27 -0700
- Cc: wgheath at fedex dot com, "automake at gnu dot org" <automake at gnu dot org>
- List-Id: Discussion list for automake <automake.gnu.org>
- References: <Pine.LNX.4.21.0011181839550.22493-100000@phobos.fachschaften.tu-muenchen.de>
- Reply-To: tromey at cygnus dot com
>>>>> "Simon" == Simon Richter <Simon.Richter@phobos.fachschaften.tu-muenchen.de> writes:
>> On Fri, 17 Nov 2000, Tim Heath wrote:
>> How do I add compiler flags? What AM is necessary to accomplish that?
Simon> Make your configure.in add them to $CFLAGS, before AC_PROG_CC
Simon> (to make sure the compiler actually accepts them).
Actually, you don't want to do that. CFLAGS, CPPFLAGS, and the like
are defined to be "user variables". That is, the user should be free
to do this:
make CFLAGS='my flags' ...
If your rewritten CFLAGS contained things necessary for your package,
this would break.
You can set private compiler flags using the `AM_' form of variables:
AM_CFLAGS, AM_CXXFLAGS, AM_CPPFLAGS, etc.
Tom