]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Add -Wno-implicit-fallthrough for zlib build in non-dev mode as well
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 15 Oct 2018 19:28:05 +0000 (21:28 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 15 Oct 2018 19:28:32 +0000 (21:28 +0200)
configure.ac

index 8dfba4bcce538732369cac1e6a8342bcb98ed10f..eaa66e522c42fc88a224685c4e4b0cbcf637439d 100644 (file)
@@ -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`