From e2074678a3295fe7ff004731b2d6d4f34b3adfb4 Mon Sep 17 00:00:00 2001 From: Markus Ongyerth Date: Fri, 16 Dec 2016 13:50:10 +0100 Subject: [PATCH] autotools: Only use -Wcast-align with gcc -Wcast-align currently breaks compilation with clang. There's a more details about it on the ell mailing list. --- acinclude.m4 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/acinclude.m4 b/acinclude.m4 index 955e8645..1a44f0c0 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -22,6 +22,8 @@ AC_DEFUN([COMPILER_FLAGS], [ CFLAGS+=" -Wdeclaration-after-statement" CFLAGS+=" -Wmissing-declarations" CFLAGS+=" -Wredundant-decls" - CFLAGS+=" -Wcast-align" + if ( $CC -v 2>/dev/null | grep "gcc version" ); then + CFLAGS+=" -Wcast-align" + fi fi ])