diff --git a/configure.ac b/configure.ac index 05edb05..cf10b51 100644 --- a/configure.ac +++ b/configure.ac @@ -100,6 +100,21 @@ AC_CHECK_DECLS([__CYGWIN__]) AC_FUNC_FORK AC_CHECK_FUNCS([gettimeofday inet_ntoa memset select socket strerror strlcpy]) +# Add -Wall -Werror for GCC if not already there +if test "x$GCC" = "xyes"; then + case " $CFLAGS " in + *[[\ \ ]]-Wall[[\ \ ]]*) ;; + *) CFLAGS="$CFLAGS -Wall" ;; + esac +fi + +if test "x$GCC" = "xyes"; then + case " $CFLAGS " in + *[[\ \ ]]-Werror[[\ \ ]]*) ;; + *) CFLAGS="$CFLAGS -Werror" ;; + esac +fi + AC_CONFIG_FILES([ Makefile src/Makefile diff --git a/tests/bandwidth-server-many-up.c b/tests/bandwidth-server-many-up.c index 989b4b0..5297c0a 100644 --- a/tests/bandwidth-server-many-up.c +++ b/tests/bandwidth-server-many-up.c @@ -28,7 +28,6 @@ #include #else #include -/* Required by inet_ntoa() to avoid a segfault! */ #include #endif