[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: compiler specific cflags
From: |
Tom Tromey |
Subject: |
Re: compiler specific cflags |
Date: |
20 Oct 2002 12:29:03 -0600 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
>>>>> "Sean" == Sean MacLennan <address@hidden> writes:
Sean> I want to set the -Wall flags iff the compiler supports it
Sean> (i.e. is gcc). How do I do this? Specifically checking for gcc
Sean> is fine.
In configure, if the compiler is gcc, then put the flags you want into
AM_CFLAGS. Then AC_SUBST this.
Read about AC_PROG_CC to see how to check whether gcc is in use.
There's a pre-existing variable.
Sean> As a secondary concern, I also want to set the flags based on a
Sean> given architecture. I guess I really want to know how automake
Sean> chooses the default cflags.
Automake doesn't, autoconf does.
In general, avoid architecture-specific stuff if possible.
If not possible, see AC_CANONICAL_HOST and friends.
Tom