Imported Upstream version 3.5.1
[platform/upstream/ccache.git] / configure
index 74581d5..a0dcbb4 100755 (executable)
--- a/configure
+++ b/configure
@@ -637,12 +637,13 @@ CPPFLAGS
 LDFLAGS
 CFLAGS
 CC
-disable_man
 test_suites
+no_implicit_fallthrough_warning
+more_warnings
 include_dev_mk
 getopt_long_c
-no_implicit_fallthrough_warning
 extra_libs
+disable_man
 host_os
 host_vendor
 host_cpu
@@ -2365,6 +2366,7 @@ esac
 
 
 
+
 # The later defininition of _XOPEN_SOURCE disables certain features
 # on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
 
@@ -4059,19 +4061,24 @@ else
     CFLAGS="$CFLAGS -O"
 fi
 
+more_warnings="-Wextra -Wpedantic"
+if test "$ac_compiler_clang" = yes; then
+    more_warnings="$more_warnings -Weverything"
+    more_warnings="$more_warnings -Wno-conversion"
+    more_warnings="$more_warnings -Wno-disabled-macro-expansion"
+    more_warnings="$more_warnings -Wno-format-nonliteral"
+    more_warnings="$more_warnings -Wno-padded"
+    more_warnings="$more_warnings -Wno-shorten-64-to-32"
+    more_warnings="$more_warnings -Wno-sign-conversion"
+fi
+
 # Check whether --enable-more_warnings was given.
 if test "${enable_more_warnings+set}" = set; then :
   enableval=$enable_more_warnings;
 fi
 
 if test x${enable_more_warnings} = xyes; then
-    CFLAGS="$CFLAGS -Wextra -Wpedantic"
-    if test "$ac_compiler_clang" = yes; then
-        CFLAGS="$CFLAGS -Weverything"
-        CFLAGS="$CFLAGS -Wno-padded -Wno-disabled-macro-expansion -Wno-format-nonliteral"
-        CFLAGS="$CFLAGS -Wno-double-promotion -Wno-float-conversion"
-        CFLAGS="$CFLAGS -Wno-conversion -Wno-shorten-64-to-32 -Wno-sign-conversion"
-    fi
+    CFLAGS="$CFLAGS $more_warnings"
 fi