Discussion:
CFLAGS for GCC
Victor Porton
2018-01-25 04:11:44 UTC
Permalink
I want to add some C flags but only when the compiler is GCC, because
GCC command line may not work with other compilers.

How?

Example:

-ansi -g -Wall -Werror -Wpedantic
Mike Frysinger
2018-01-25 04:39:33 UTC
Permalink
Post by Victor Porton
I want to add some C flags but only when the compiler is GCC, because
GCC command line may not work with other compilers.
if you call AC_PROG_CC, it'll export $GCC you can check against "yes"
Post by Victor Porton
-ansi -g -Wall -Werror -Wpedantic
are you sure you really want -ansi/-Wpedantic ? that's for like 1990
standards. it's been almost 30 years man.
-mike

Loading...