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.
This commit is contained in:
Markus Ongyerth 2016-12-16 13:50:10 +01:00 committed by Denis Kenzior
parent 27bdddf010
commit e2074678a3
1 changed files with 3 additions and 1 deletions

View File

@ -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
])