aboutsummaryrefslogtreecommitdiff
blob: b18e5d5acd337f9b6b46556526b6bd066445260e (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
64
65
66
67
68
69
70
Add --enable-werror.

https://bugs.gentoo.org/475350


2013-06-30  Ryan Hill  <dirtyepic@gentoo.org>

	* configure.ac: Add --enable-werror.
	(XCFLAGS): Use it.
	* configure: Regenerate.

--- a/libitm/configure.ac
+++ b/libitm/configure.ac
@@ -252,9 +252,15 @@ GCC_CHECK_ELF_STYLE_WEAKREF
 CFLAGS="$save_CFLAGS"
 AC_CACHE_SAVE
 
-# Add -Wall -Werror if we are using GCC.
+AC_ARG_ENABLE(werror, [AS_HELP_STRING([--enable-werror],
+                                      [turns on -Werror @<:@default=yes@:>@])])
+# Add -Wall if we are using GCC.
 if test "x$GCC" = "xyes"; then
-  XCFLAGS="$XCFLAGS -Wall -Werror"
+  XCFLAGS="$XCFLAGS -Wall"
+  # Add -Werror if requested.
+  if test "x$enable_werror" != "xno"; then
+    XCFLAGS="$XCFLAGS -Werror"
+  fi
 fi
 
 XCFLAGS="$XCFLAGS $XPCFLAGS"
--- a/libitm/configure
+++ b/libitm/configure
@@ -775,6 +775,7 @@ enable_maintainer_mode
 enable_linux_futex
 enable_tls
 enable_symvers
+enable_werror
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1423,6 +1424,7 @@ Optional Features:
   --enable-tls            Use thread-local storage [default=yes]
   --enable-symvers=STYLE  enables symbol versioning of the shared library
                           [default=yes]
+  --enable-werror         turns on -Werror [default=yes]
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -17491,9 +17493,18 @@ $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
 fi
 rm -f confcache
 
-# Add -Wall -Werror if we are using GCC.
+# Check whether --enable-werror was given.
+if test "${enable_werror+set}" = set; then :
+  enableval=$enable_werror;
+fi
+
+# Add -Wall if we are using GCC.
 if test "x$GCC" = "xyes"; then
-  XCFLAGS="$XCFLAGS -Wall -Werror"
+  XCFLAGS="$XCFLAGS -Wall"
+  # Add -Werror if requested.
+  if test "x$enable_werror" != "xno"; then
+    XCFLAGS="$XCFLAGS -Werror"
+  fi
 fi
 
 XCFLAGS="$XCFLAGS $XPCFLAGS"