From: Simon Marchi Date: Fri, 31 Jan 2020 18:05:20 +0000 (-0500) Subject: configure: use AX_APPEND_COMPILE_FLAGS to detect supported warning flags X-Git-Tag: v2.13.0-rc1~753 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=7f08cc82e68617aa423952b8f9cc7c74bc247f8d;hp=7f08cc82e68617aa423952b8f9cc7c74bc247f8d 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 Change-Id: Id2ae4b4e8882af788c835ce89a979544531370e9 Signed-off-by: Jérémie Galarneau ---