configure: Enable compiler warnings to help add 'format' attribute
commitfc825382d6cd84123105fd6f484a8d9c45c05179
authorChristophe CURIS <christophe.curis@free.fr>
Fri, 15 Nov 2013 17:46:38 +0000 (15 18:46 +0100)
committerCarlos R. Mafra <crmafra@gmail.com>
Mon, 30 Dec 2013 18:11:04 +0000 (30 18:11 +0000)
tree41412cbe218df244991f18439a91385d9de868c1
parent68a902aa2eeacc03e66823f7228685df53a3b18e
configure: Enable compiler warnings to help add 'format' attribute

This attribute helps the compiler checking the type matching between
arguments and the specification in a printf-like format string, to
avoid invalid output. This attribute is optional, but some compilers
can suggest functions that could have it.

This patch adds the appropriate compiler flags if they are supported when
the source is being compiled with DEBUG enabled.

The patch also introduces a new macro WM_CFLAGS_CHECK_FIRST because in some
cases AX_CFLAGS_GCC_OPTION is not really efficient and in present case it
does not fits the job.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
configure.ac
m4/wm_cflags_check.m4 [new file with mode: 0644]