summaryrefslogtreecommitdiff
blob: 485cd1934fc65ea3f4eb9e929edf6679b92ce841 (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
54
55
56
57
58
59
60
61
62
63
Author: hasufell <hasufell@gentoo.org>
Date:   Sat Dec 28 23:48:53 2013 +0100

    * respect system flags
    * remove Werror, it breaks the build

--- a/configure.in
+++ b/configure.in
@@ -194,12 +194,7 @@ AM_CONDITIONAL(X11VDPAU_CORE, test "$enable_x11vdpau" = "yes")
 AC_CHECK_HEADERS(linux/compiler.h linux/unistd.h asm/page.h signal.h)
 
 
-dnl Clear default CFLAGS
-if test x"$CFLAGS" = x"-g -O2"; then
-  CFLAGS=
-fi
-
-CFLAGS="-ffast-math -pipe $CFLAGS"
+CFLAGS="-ffast-math $CFLAGS"
 
 DFB_INTERNAL_CFLAGS="-D_GNU_SOURCE $DFB_INTERNAL_CFLAGS"
 
@@ -467,7 +462,7 @@ AC_ARG_ENABLE(debug,
                              [enable debugging @<:@default=no@:>@]),
               [], [enable_debug=no])
 if test "$enable_debug" = "yes"; then
-    CFLAGS="-g3 -O0 -fno-inline -Wno-inline $CFLAGS"
+    CFLAGS="-fno-inline -Wno-inline $CFLAGS"
     DIRECT_BUILD_DEBUG=1
 else
     DIRECT_BUILD_DEBUG=0
@@ -483,13 +478,8 @@ AC_ARG_ENABLE(debug-support,
               [], [enable_debug_support=yes])
 if test "$enable_debug_support" = "yes" || test "$enable_debug" = "yes"; then
     enable_debug_support=yes
-    if test "$enable_debug" = "no"; then
-        CFLAGS="-g2 $CFLAGS"
-    fi
-    CFLAGS="-O3 $CFLAGS"
     DIRECT_BUILD_DEBUGS=1
 else
-    CFLAGS="-O3 -g0 $CFLAGS"
     DIRECT_BUILD_DEBUGS=0
 fi
 AM_CONDITIONAL(ENABLE_DEBUGS, test "$enable_debug_support" = "yes")
@@ -2750,8 +2750,6 @@
 
 AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
 
-CFLAGS="$CFLAGS -Werror-implicit-function-declaration"
-
 AC_ARG_ENABLE(extra-warnings,
               AC_HELP_STRING([--enable-extra-warnings],
                              [enable extra warnings @<:@default=no@:>@]),
@@ -2761,7 +2759,7 @@
 fi
 
 if test "$GCC" = "yes"; then
-  CFLAGS="-Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-strict-aliasing -Werror-implicit-function-declaration $CFLAGS"
+  CFLAGS="-Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-strict-aliasing $CFLAGS"
   CXXFLAGS="-Wall -Wno-strict-aliasing -std=$CXXSTD $CXXFLAGS"
 fi