Commit cfe875e72ebfe283dbc771e8387d8ef0b10d1995
1 parent
ef539e0d
Add -Wall and -Werror for GCC
- removed comment not required anymore with -Wall -Werror
Showing
2 changed files
with
15 additions
and
1 deletions
configure.ac
| ... | ... | @@ -100,6 +100,21 @@ AC_CHECK_DECLS([__CYGWIN__]) |
| 100 | 100 | AC_FUNC_FORK |
| 101 | 101 | AC_CHECK_FUNCS([gettimeofday inet_ntoa memset select socket strerror strlcpy]) |
| 102 | 102 | |
| 103 | +# Add -Wall -Werror for GCC if not already there | |
| 104 | +if test "x$GCC" = "xyes"; then | |
| 105 | + case " $CFLAGS " in | |
| 106 | + *[[\ \ ]]-Wall[[\ \ ]]*) ;; | |
| 107 | + *) CFLAGS="$CFLAGS -Wall" ;; | |
| 108 | + esac | |
| 109 | +fi | |
| 110 | + | |
| 111 | +if test "x$GCC" = "xyes"; then | |
| 112 | + case " $CFLAGS " in | |
| 113 | + *[[\ \ ]]-Werror[[\ \ ]]*) ;; | |
| 114 | + *) CFLAGS="$CFLAGS -Werror" ;; | |
| 115 | + esac | |
| 116 | +fi | |
| 117 | + | |
| 103 | 118 | AC_CONFIG_FILES([ |
| 104 | 119 | Makefile |
| 105 | 120 | src/Makefile | ... | ... |