configure: Test compiler flags
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 6 Jun 2015 13:53:00 +0000 (15:53 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 22 Nov 2015 09:23:54 +0000 (10:23 +0100)
commit23373d01d90c8063cbb5a4fe87c320ebb11c5de7
treec39447adafa854f0afc6d6b2a8fc6495c03f4391
parent35f34581bed5d9eb8e456773c1fb24916bc64c3c
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>
GNUmakefile.in
Make.mk
configure.ac
m4/ax_append_flag.m4 [new file with mode: 0644]
m4/ax_check_compile_flag.m4 [new file with mode: 0644]
m4/ax_require_defined.m4 [new file with mode: 0644]
m4/my_append_compile_flags.m4 [new file with mode: 0644]