aboutsummaryrefslogtreecommitdiff
blob: d06fc4ce8b8b3204ec05076cbf39bd09b1215a20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
https://bugs.gentoo.org/656984

Don't build with -Werror flags.

--- a/configure.ac
+++ b/configure.ac
@@ -544,45 +544,11 @@
 AC_SUBST(LDFLAGS_FOR_BUILD)
 
 my_am_cflags="\
- -pipe \
  -Wall \
  -Wextra \
- -Werror=strict-prototypes \
- -Werror=missing-prototypes \
- -Werror=missing-declarations \
- -Werror=format=2 \
- -Werror=undef \
- -Werror=missing-include-dirs \
- -Werror=strict-aliasing=2 \
- -Werror=init-self \
- -Werror=implicit-function-declaration \
- -Werror=return-type \
- -Werror=switch \
- -Werror=overflow \
- -Werror=parentheses \
- -Werror=aggregate-return \
- -Werror=unused-result \
  -fno-strict-aliasing \
 "
-
-AC_DEFUN([CHECK_CCSUPPORT], [
-  my_save_cflags="$CFLAGS"
-  CFLAGS=$1
-  AC_MSG_CHECKING([whether CC supports $1])
-  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
-    [AC_MSG_RESULT([yes])]
-    [$2+=$1],
-    [AC_MSG_RESULT([no])]
-  )
-  CFLAGS="$my_save_cflags"
-])
-
-CHECK_CCSUPPORT([-Werror=format-overflow=2], [flg1])
-CHECK_CCSUPPORT([-Werror=int-conversion], [flg2])
-CHECK_CCSUPPORT([-Werror=incompatible-pointer-types], [flg3])
-CHECK_CCSUPPORT([-Werror=misleading-indentation], [flg4])
-
-AC_SUBST([AM_CFLAGS], ["$my_am_cflags $flg1 $flg2 $flg3 $flg4"])
+AC_SUBST([AM_CFLAGS], ["$my_am_cflags"])
 
 # Make sure that $ACLOCAL_FLAGS are used during a rebuild
 AC_SUBST([ACLOCAL_AMFLAGS], ["-I $ac_macro_dir \$(ACLOCAL_FLAGS)"])