configure: Test compiler flags
When AC_PROG_CC detects GCC, Make.mk adds a bunch of flags to CFLAGS. Works only for flags that any version of gcc in use accepts. Instead, make configure add the flags that actually work to CFLAGS. This will let us add flags that work only for some compilers. The new autoconf macros are from autoconf-archive v2015.02.24. Unfortunately, AX_APPEND_COMPILE_FLAGS doesn't work reliably for -Wno-*: gcc complains about unknown -Wno-foo only when other diagnostics are being produced. Test -Wfoo instead of -Wno-foo, and rename to MY_APPEND_COMPILE_FLAGS. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
35f34581be
commit
23373d01d9
7 changed files with 269 additions and 9 deletions
|
@ -37,7 +37,6 @@ TARNAME := @PACKAGE_TARNAME@
|
|||
VERSION := @PACKAGE_VERSION@
|
||||
|
||||
CC := @CC@
|
||||
have_gcc := @GCC@
|
||||
CFLAGS := @CFLAGS@
|
||||
CPPFLAGS := @CPPFLAGS@ @DEFS@
|
||||
LDFLAGS := @LDFLAGS@
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue