Elia Pinto | 16 Apr 2012 16:56
Picon

[PATCH] Add CL_CFLAGS and CL_LDFLAGS macro

These autoconf macros permit to enable a particular
compiler option in a portable way, testing if
the particular compiler version support it and
ignoring the option if it is not supported.

These are derived from gnulib warnings.m4 macro,
but do the check in a little different way.

Signed-off-by: Elia Pinto <gitter.spiros <at> gmail.com>
---
 configure.in    |   13 ++++++++++++-
 m4/acinclude.m4 |   52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 64 insertions(+), 1 deletions(-)

diff --git a/configure.in b/configure.in
index 9ea805c..0cf03da 100644
--- a/configure.in
+++ b/configure.in
 <at>  <at>  -1568,9 +1568,20  <at>  <at>  WERR_CFLAGS=
 WERR_CFLAGS_MILTER=
 if test "x$enable_distcheckwerror" = "xyes"; then
     if test "$distcheck_enable_flags" = "1"; then
-	WERR_COMMON="-Wno-pointer-sign -Werror-implicit-function-declaration -Werror -Wextra -Wall
-Wno-error=bad-function-cast -Wbad-function-cast -Wcast-align -Wendif-labels -Wfloat-equal
-Wformat=2 -Wformat-security -Wmissing-declarations -Wmissing-prototypes
-Wno-error=missing-prototypes -Wnested-externs -Wno-error=nested-externs -Wpointer-arith
-Wstrict-prototypes -Wno-error=strict-prototypes -Wno-switch -Wno-switch-enum -Wundef
-Wstrict-overflow=1 -Winit-self -Wmissing-include-dirs -Wstrict-aliasing
-Wdeclaration-after-statement -Waggregate-return -Wmissing-format-attribute
-Wno-error=missing-format-attribute -Wno-error=type-limits
(Continue reading)


Gmane