configure: use AX_APPEND_COMPILE_FLAGS to detect supported warning flags
I would eventually like to enable some additional warnings by default
when building lttng-tools. However, some warnings are
compiler-specific or are not present in older versions of some compilers
we need to support. We can therefore not add them unconditionally to
CFLAGS.
This patch uses the AX_APPEND_COMPILE_FLAGS macro to address that. This
macro tests each individual flag we pass it with the current compiler.
If it finds that the flag is supported (the compiler exits with status 0
when compiling a file with that flag), it appends it to the given
variable, WARN_CFLAGS in our case). WARN_CFLAGS is then added to
AM_CFLAGS.
With time, we'll be able to throw any warning flag in there that we
think is useful, even if just available in a recent version of one
compiler.
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Change-Id: Id2ae4b4e8882af788c835ce89a979544531370e9
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
This page took 0.025654 seconds and 4 git commands to generate.