From: Joel Rosdahl Date: Mon, 15 Oct 2018 19:28:05 +0000 (+0200) Subject: Add -Wno-implicit-fallthrough for zlib build in non-dev mode as well X-Git-Tag: v3.5~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cbbd015b70dd36c139f3f9fc8e93e1d4337c39a6;p=thirdparty%2Fccache.git Add -Wno-implicit-fallthrough for zlib build in non-dev mode as well --- diff --git a/configure.ac b/configure.ac index 8dfba4bcc..eaa66e522 100644 --- a/configure.ac +++ b/configure.ac @@ -199,17 +199,6 @@ if test ! -f $srcdir/dev_mode_disabled && test "$RUN_FROM_BUILD_FARM" != yes; th include_dev_mk='include dev.mk' version=`(git --git-dir=$srcdir/.git describe --dirty 2>/dev/null || echo vunknown) | sed -e 's/v//' -e 's/-/+/' -e 's/-/_/g'` echo "extern const char CCACHE_VERSION@<:@@:>@; const char CCACHE_VERSION@<:@@:>@ = \"$version\";" >src/version.c - - dnl Check for -Wno-implicit-fallthrough - AC_MSG_CHECKING([whether C compiler supports -Wno-implicit-fallthrough]) - saved_cflags=$CFLAGS - CFLAGS=-Wno-implicit-fallthrough - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], - [AC_MSG_RESULT([yes])] - [no_implicit_fallthrough_warning="-Wno-implicit-fallthrough"], - [AC_MSG_RESULT([no])] - ) - CFLAGS=$saved_cflags else AC_MSG_NOTICE(developer mode disabled) fi @@ -219,6 +208,17 @@ if test ! -f $srcdir/src/version.c -a ! -f src/version.c ; then echo "extern const char CCACHE_VERSION@<:@@:>@; const char CCACHE_VERSION@<:@@:>@ = \"unknown\";" >src/version.c fi +dnl Check for -Wno-implicit-fallthrough +AC_MSG_CHECKING([whether C compiler supports -Wno-implicit-fallthrough]) +saved_cflags=$CFLAGS +CFLAGS=-Wno-implicit-fallthrough +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], + [AC_MSG_RESULT([yes])] + [no_implicit_fallthrough_warning="-Wno-implicit-fallthrough"], + [AC_MSG_RESULT([no])] +) +CFLAGS=$saved_cflags + dnl Find test suite files. test_suites=`cd $srcdir && ls unittest/test_*.c | egrep -v 'BASE|BACKUP|LOCAL|REMOTE' | xargs echo`