Skip to content

Commit 95fdaa6

Browse files
configure.ac Fix compilation with CC=clang
compilation was not possible with -Werror if clang is used. Now warnings from unknown -W flags are supressed. Signed-off-by: Juergen Repp <juergen_repp@web.de>
1 parent 76be47f commit 95fdaa6

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

configure.ac

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,17 @@ AS_IF([test x"$strip" = x"yyy"], [
373373
AC_MSG_NOTICE([Not using compiler options to reduce binary size!])
374374
)
375375

376+
AC_MSG_CHECKING([whether the compiler is Clang])
377+
CLANG=no
378+
if $CC --version 2>/dev/null | grep -qi clang; then
379+
CLANG=yes
380+
fi
381+
AC_MSG_RESULT([$CLANG])
382+
383+
if test "x$CLANG" = "xyes"; then
384+
EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-unknown-warning-option"
385+
fi
386+
376387
AC_SUBST([EXTRA_CFLAGS])
377388
AC_SUBST([EXTRA_LDFLAGS])
378389
AC_SUBST([PATH])

0 commit comments

Comments
 (0)